Created
October 20, 2015 19:47
-
-
Save timsgardner/fc7834f95894df9bf1ba 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 clojure.lang; | |
using System; | |
[Serializable] | |
public class clojure_west/stupid_idea$volatile_fun_test$fn__499__503 : AFunction | |
{ | |
// | |
// Static Fields | |
// | |
protected internal static object const__0; | |
protected internal static Var const__1; | |
protected internal static Var const__2; | |
protected internal static Var const__3; | |
// | |
// Fields | |
// | |
public Volatile v; | |
public long n__57148__auto__; | |
public Keyword x; | |
// | |
// Constructors | |
// | |
static clojure_west/stupid_idea$volatile_fun_test$fn__499__503 () | |
{ | |
clojure_west/stupid_idea$volatile_fun_test$fn__499__503.const__0 = (object)0; | |
clojure_west/stupid_idea$volatile_fun_test$fn__499__503.const__1 = RT.var ("clojure.core", "<"); | |
clojure_west/stupid_idea$volatile_fun_test$fn__499__503.const__2 = RT.var ("clojure.core", "vreset!"); | |
clojure_west/stupid_idea$volatile_fun_test$fn__499__503.const__3 = RT.var ("clojure.core", "unchecked-inc"); | |
} | |
public clojure_west/stupid_idea$volatile_fun_test$fn__499__503 (object obj, long num, object obj2) | |
{ | |
this.x = obj; | |
this.n__57148__auto__ = num; | |
this.v = obj2; | |
} | |
// | |
// Methods | |
// | |
public override bool HasArity (int num) | |
{ | |
return num == 0; | |
} | |
public override object invoke () | |
{ | |
for (long num = 0; num < this.n__57148__auto__; num += 1) { | |
((IFn)clojure_west/stupid_idea$volatile_fun_test$fn__499__503.const__2.getRawRoot ()).invoke (this.v, this.x); | |
} | |
return null; | |
} | |
} |
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 clojure.lang; | |
using System; | |
[Serializable] | |
public class clojure_west/stupid_idea$volatile_fun_test__506 : AFunction | |
{ | |
// | |
// Static Fields | |
// | |
protected internal static Var const__0; | |
protected internal static Var const__6; | |
protected internal static Var const__5; | |
protected internal static object const__4; | |
protected internal static Var const__3; | |
protected internal static Keyword const__2; | |
protected internal static object const__1; | |
// | |
// Constructors | |
// | |
static clojure_west/stupid_idea$volatile_fun_test__506 () | |
{ | |
clojure_west/stupid_idea$volatile_fun_test__506.const__0 = RT.var ("clojure.core", "volatile!"); | |
clojure_west/stupid_idea$volatile_fun_test__506.const__1 = (object)0; | |
clojure_west/stupid_idea$volatile_fun_test__506.const__2 = RT.keyword (null, "bla"); | |
clojure_west/stupid_idea$volatile_fun_test__506.const__3 = RT.var ("clojure.core", "long"); | |
clojure_west/stupid_idea$volatile_fun_test__506.const__4 = (object)3000000; | |
clojure_west/stupid_idea$volatile_fun_test__506.const__5 = RT.var ("clojure.core", "prn"); | |
clojure_west/stupid_idea$volatile_fun_test__506.const__6 = RT.var ("clojure.core", "str"); | |
} | |
// | |
// Methods | |
// | |
public override bool HasArity (int num) | |
{ | |
return num == 0; | |
} | |
public override object invoke () | |
{ | |
object obj = ((IFn)clojure_west/stupid_idea$volatile_fun_test__506.const__0.getRawRoot ()).invoke (clojure_west/stupid_idea$volatile_fun_test__506.const__1); | |
object obj2 = clojure_west/stupid_idea$volatile_fun_test__506.const__2; | |
object obj3 = RT.StartStopwatch (); | |
long num = RT.longCast (3000000); | |
object result = ((IFn)new clojure_west/stupid_idea$volatile_fun_test$fn__499__503 (obj2, num, obj)).invoke (); | |
((IFn)clojure_west/stupid_idea$volatile_fun_test__506.const__5.getRawRoot ()).invoke (((IFn)clojure_west/stupid_idea$volatile_fun_test__506.const__6.getRawRoot ()).invoke ("Elapsed time: ", RT.StopStopwatch (), " msecs")); | |
return result; | |
} | |
} |
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
(defn volatile-fun-test [] | |
(let [v (volatile! 0) | |
x :bla] | |
(time | |
(dotimes [i 3e6] | |
(vreset! v x))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment