John Cowan schrieb:
> On Tue, Apr 29, 2008 at 5:36 PM, Jochen Theodorou <[EMAIL PROTECTED]> wrote:
> 
>>  I wanted to collect a bit data to how you avoid boxing in your language
>>  implementations.
> 
> My language provides bignums and flonums, which I simply represent as
> BigIntegers and Doubles. I pay the boxing penalty, but the
> combinatorial explosion isn't too bad (only 4 cases to deal with).   I
> worry about converting to and from Byte, Short, Int, Long, and Float
> objects only when communicating with native Java methods.
> 
> My measurements show that the cost of using BigIntegers for numbers
> representable by Integers is only about 2.5 times in the worst case (a
> tight loop multiplying numbers), which I don't worry about -- the
> mathematical tractability of BigIntegers is a huge win.

well in case of adding two ints I get numbers telling me the factor is 
more 20, then 2.5. That is better than using Integer, but still far from 
  good. So you have a micro benchmark showing this effect?I mean one 
without all the other effects that will slow down computation. Because 
it is well possible that other effects take so much time, that you don't 
see the actual speedup... and won't see it.One the other hand that 
scenario would be more realistic I guess... and it would also mean that 
you have to get the other things faster ;)

bye Jochen

-- 
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/
http://www.g2one.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" 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/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to