I have extensive google closure experience, but little low level 
clojurescript experience.
Could we use the clojure library's Integer or long type. It will likely not 
be as fast but when you need it you need it.
http://closure-library.googlecode.com/svn/docs/closure_goog_math_integer.js.html
http://closure-library.googlecode.com/svn/docs/closure_goog_math_long.js.html
If you can tell me if I would be wasting my time or not I will start 
working on a comprehensive design.


On Saturday, August 11, 2012 1:47:06 PM UTC-5, David Nolen wrote:
>
> On Sun, Aug 5, 2012 at 10:43 PM, Olaf Delgado-Friedrichs 
> <olaf.d...@googlemail.com <javascript:>> wrote: 
> > Thanks for the link! I didn't know that the Closure library contained an 
> > arbitrary precision type, but should have expected it. 
> > 
> > When you speak of performance, do you mean the extra cost of checking 
> > argument types for the arithmetic operators? I wonder if this could be 
> > addressed by introducing alternate operators +', -' and *' as in 
> Clojure, 
> > make these support the additional numeric types and leave the existing 
> > operators alone. This is certainly something that makes sense for me to 
> do 
> > in a library. 
> > 
> > In order to support the BigInt and Ratio literals, would I have to 
> modify 
> > the ClojureScript sources, or is it possible to extend emit-constant in 
> > "user space"? 
> > 
> > Olaf 
>
> Sorry, forgot to follow up this. I haven't put any deep thought into 
> it so I can offer no implementation guidance. I think it will be 
> pretty challenging to get full Clojure JVM numeric semantics into 
> ClojureScript w/o impacting performance. 
>
> It can probably be done but requires both a comprehensive design and 
> good implementation strategy. If someone wants to take it on ... 
> great! 
>
> David 
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to