[squeak-dev] Fun with spock (NativeBoost FFI)

Igor Stasenko siguctua at gmail.com
Sun May 13 20:24:26 UTC 2012


On 13 May 2012 20:58, Nicolas Cellier
<nicolas.cellier.aka.nice at gmail.com> wrote:
> Smalltalk cannot beat gmp, but the comparison is not fair, anything
> can beat current implementation of factorial...

Right. It is not fair. Especially that we're talking about something
implemented in C
vs something implemented in smalltalk.
The comparison would be more fair if we could have a separate
primitive for factorial.

> See http://smallissimo.blogspot.fr/2011/07/evaluating-factorial-from-its-prime.html
> and some following posts which has a few links on how to compute it
> efficiently.
>
> Nicolas
>
> 2012/5/13 Lawson English <lenglish5 at cox.net>:
>> On 5/13/12 11:02 AM, Lawson English wrote:
>>
>> [results]
>>
>> Ack, I printed the times for the gmplib off by a factor of 10. However, the
>> ratio is still correct.
>>
>> gmplib is at least 700x faster than the built-in factorial method for 100000
>> factorial.
>>
>>
>> --
>> Squeak from the very start (introduction to Squeak and Pharo Smalltalk for
>> the (almost) complete and compleate beginner).
>> https://www.youtube.com/playlist?list=PL6601A198DF14788D&feature=view_all
>>
>>
>



-- 
Best regards,
Igor Stasenko.


More information about the Squeak-dev mailing list