Rich Hickey schrieb: > > On Apr 29, 5:36 pm, Jochen Theodorou <[EMAIL PROTECTED]> wrote: [...] > I think the answer is tags, as John Rose discussed here: > > http://blogs.sun.com/jrose/entry/fixnums_in_the_vm > > That, standard fast multiprecision arithmetic, and tail call > optimization are the wish list for me.
I don't see how this will help me in Groovy. We use the Java types, so there is no need to represent a 20 bit integer. Also we mostly want to call Java methods, and those might take int, not a fixnum. If I have to transform the fixnum into a int first, then I will loose performance already. And I don't think that the JVM will provide new bytecodes to multiply, divide and add fixnums. Especially not since the JVM can not know how these operations have to be performed in detail... for example in case of an overflow. The current approach of a class with a value field is when containing an int and doing plus operations around 45 times slower than direct usage of primitive ints. Operations on Integer objects are no better here. 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 -~----------~----~----~----~------~----~------~--~---
