[Pharo-users] [Article] Speeding up factorial computation by changing the order of multiplications
thierry.goubier at gmail.com
Tue May 24 04:55:41 EDT 2016
Using '((self + upper) / 2 ) truncated' seems to be a little bit faster
than 'self + upper bitshift: -1'.
2016-05-24 9:57 GMT+02:00 Sven Van Caekenberghe <sven at stfx.eu>:
> I just published a short, introduction level article,
> Speeding up factorial computation by changing the order of multiplications.
> This is a story about a small, seemingly innocent code change that speeds
> up a very simple computation. It is pretty magical and serves as an example
> of how things are not always what they seem.
> Sven Van Caekenberghe
> Proudly supporting Pharo
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-users