Skip to content

Instantly share code, notes, and snippets.

@timsgardner
Last active October 20, 2015 20:07
Show Gist options
  • Save timsgardner/f85871efc7ee337e116b to your computer and use it in GitHub Desktop.
Save timsgardner/f85871efc7ee337e116b to your computer and use it in GitHub Desktop.
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;
}
}
}
(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
(time (CubiquityHelper/stupidTest 3e6))
;; => 15 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment