Created
October 13, 2011 11:59
-
-
Save primalmotion/1284064 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
| @import <Foundation/CPObject.j> | |
| toto = function() | |
| { | |
| for(var i = 0; i < 10000; i++); | |
| } | |
| @implementation Util : CPObject | |
| + (void)toto | |
| { | |
| for(var i = 0; i < 10000; i++); | |
| } | |
| @end | |
| @implementation AppController : CPObject | |
| { | |
| } | |
| - (void)applicationDidFinishLaunching:(CPNotification)aNotification | |
| { | |
| var t0 = new Date().getTime(); | |
| toto(); | |
| var t1 = new Date().getTime(); | |
| console.log("exec time functinon: " + (t1 - t0) + "ms"); | |
| var t0 = new Date().getTime(); | |
| [Util toto]; | |
| var t1 = new Date().getTime(); | |
| console.log("exec time functinon: " + (t1 - t0) + "ms"); | |
| } | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment