aspect optimization // also prevents overflow... { /* fast fibonacci */ int[] mmult(int[] A, int[] B) // 2x2 matrix multiplication { int[] C = new int[4]; C[0] = (A[0]*B[0] + A[1]*B[2]); C[1] = (A[0]*B[1] + A[1]*B[3]); C[2] = (A[2]*B[0] + A[3]*B[2]); C[3] = (A[2]*B[1] + A[3]*B[3]); return C; } int around(int n) : call(int base+.fib(int)) && args(n) { if (n<3) return 1; int[] AX = {1,1,1,0}; // fibonacci matrix (in 1D) int[] Binfact = {1,1,1,0}; n-=2; while (n>0) { if (n%2==1) AX = mmult(AX,Binfact); Binfact = mmult(Binfact,Binfact); n = n/2; // right shift } return AX[0]; }// around advice replaces inefficient fibonacci call }//optimization