I was profiling my app today, and noticed lots of time being spent in
Reflector.invokeStaticMethod.  The cause was some calls to Math/abs,
which was surprising to me since clojure.org says "Note that type
hints are not needed for static members (or their return values!) as
the compiler always has the type for statics." (I assumed this
extended to methods as well).  As confirmation,

user> (set! *warn-on-reflection* true)
true
user> (defn abs [x] (Math/abs x))
Reflection warning, line: 1 - call to abs can't be resolved.
#'user/abs

Is there a more efficient way to call static methods without
reflection?  Sorry if I'm missing something or this has been answered
before ...

Thanks!
Jason


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to