Last active
October 20, 2015 20:07
-
-
Save timsgardner/f85871efc7ee337e116b 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
using Cubiquity; | |
public class CubiquityHelper{ | |
public static void stupidTest(uint n){ | |
bool[] ar = new bool[1]; | |
for(int i = 0; i < n; i++){ | |
ar[0] = true; | |
} | |
} | |
} |
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
(let [^|System.Boolean[]| a (make-array Boolean 1) | |
x (boolean true)] | |
(time | |
(dotimes [i 3e6] | |
(aset a 0 x)))) | |
;; => 440 ms | |
(let [^|System.Boolean[]| a (make-array Boolean 1)] | |
(time | |
(dotimes [i 3e6] | |
(aset a 0 true)))) | |
;; => 829 ms :P |
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
(time (CubiquityHelper/stupidTest 3e6)) | |
;; => 15 ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment