Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize static method calls #701

Open
borkdude opened this issue Mar 19, 2022 · 0 comments
Open

Optimize static method calls #701

borkdude opened this issue Mar 19, 2022 · 0 comments

Comments

@borkdude
Copy link
Collaborator

user=> (def f (sci/eval-string "(fn [] (Math/sin 3.14))" {:classes {'Math Math}}))
#'user/f
user=>
user=> (defn foo [] (Math/sin 3.14))
#'user/foo
user=> (time (dotimes [i 1000000] (f)))
"Elapsed time: 2171.718646 msecs"
nil
user=> (time (dotimes [i 1000000] (foo)))
"Elapsed time: 18.466058 msecs"
nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant