Created
November 20, 2013 18:21
-
-
Save SiarheiFedartsou/7568295 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const NSUInteger testCount = 1000000; | |
{ | |
CFAbsoluteTime t = CFAbsoluteTimeGetCurrent(); | |
GLKMatrixStackRef stack = GLKMatrixStackCreate(NULL); | |
GLKMatrixStackLoadMatrix4(stack, GLKMatrix4Identity); | |
for (NSUInteger i = 0; i < testCount; i++) { | |
GLKMatrixStackPush(stack); | |
GLKMatrixStackMultiplyMatrix4(stack, GLKMatrix4Identity); | |
GLKMatrixStackPop(stack); | |
} | |
NSLog(@"time GLKit: %f", CFAbsoluteTimeGetCurrent() - t); | |
} | |
{ | |
kmMat4 identity; | |
kmMat4Identity(&identity); | |
CFAbsoluteTime t = CFAbsoluteTimeGetCurrent(); | |
kmGLLoadIdentity(); | |
for (NSUInteger i = 0; i < testCount; i++) { | |
kmGLPushMatrix(); | |
kmGLMultMatrix(&identity); | |
kmGLPopMatrix(); | |
} | |
NSLog(@"time kazmath: %f", CFAbsoluteTimeGetCurrent() - t); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment