[Vm-dev] 3 Bugs in LargeInteger primitives
nicolas.cellier.aka.nice at gmail.com
Thu Aug 30 20:54:55 UTC 2012
2012/8/30 Stefan Marr <smalltalk at stefan-marr.de>:
> On 30 Aug 2012, at 01:14, Nicolas Cellier wrote:
>> See also http://code.google.com/p/cog/issues/detail?id=92 where I
>> attached a fix for large int
>> It's untested yet and to review carefully !
>> As Stefan told, there is UB-reliance in SmallInteger primitives too,
>> but I did not fix them.
>> We should simply compute result as signed 64 bits as proposed by
>> Stefan (except bitShift)
> This might be the simplest solution, but at least on the RoarVM I measured a significant performance impact on tight integer loops.
> It's 20% according to my measurements.
> Might be something necessary to be considered.
> Best regards
My fix for LargeInt seem to give same or better timing than old bogus
ones despite double function call for getting sign and magnitude.
Note that I updated http://code.google.com/p/cog/issues/detail?id=92
with a corrected version.
1st one bogusly tried to use oop as a type, I obviously don't program
VM every day ;)
> Stefan Marr
> Software Languages Lab
> Vrije Universiteit Brussel
> Pleinlaan 2 / B-1050 Brussels / Belgium
> Phone: +32 2 629 2974
> Fax: +32 2 629 3525
More information about the Vm-dev