Re: [Pharo-project] [squeak-dev] Fun with spock (NativeBoost FFI)

2012-05-15 Thread Lawson English
On 5/14/12 8:06 PM, Lawson English wrote: On 5/14/12 8:02 PM, Lawson English wrote: OK, getting closer. However I'm still not quite getting what I expect: f1 := GMPfWrapper new. f2 := GMPfWrapper new. f3 := GMPfWrapper new. f1 set_ui: 50. f2 set_ui: 50. f3 set_ui:50. (f3 +f2) asString == '1

Re: [Pharo-project] [squeak-dev] Fun with spock (NativeBoost FFI)

2012-05-15 Thread Igor Stasenko
On 15 May 2012 09:42, Lawson English lengli...@cox.net wrote: On 5/14/12 8:06 PM, Lawson English wrote: On 5/14/12 8:02 PM, Lawson English wrote: OK, getting closer. However I'm still not quite getting what I expect: f1 := GMPfWrapper new. f2 := GMPfWrapper new. f3 := GMPfWrapper new.

Re: [Pharo-project] [squeak-dev] Fun with spock (NativeBoost FFI)

2012-05-14 Thread Marcus Denker
On May 14, 2012, at 12:49 AM, Igor Stasenko wrote: On 14 May 2012 00:03, Lawson English lengli...@cox.net wrote: [pharo-project list added back in] On 5/13/12 1:34 PM, Nicolas Cellier wrote: [10 primeSwingFactorial] timeToRun 3411 [10 factorial] timeToRun 61219 So gmp is still

Re: [Pharo-project] [squeak-dev] Fun with spock (NativeBoost FFI)

2012-05-14 Thread Lawson English
I am trying to implement an asString method for gmp floats but I don't quite see how. Prototype for getting a string is: Function: char * mpf_get_str (char *str, mp_exp_t *expptr, int base, size_t n_digits, mpf_t op) where mp_exp_t *expptr is just a pointer to a long, and size_t is just

Re: [Pharo-project] [squeak-dev] Fun with spock (NativeBoost FFI)

2012-05-13 Thread Lawson English
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 10 factorial. -- Squeak from the very start (introduction to

Re: [Pharo-project] [squeak-dev] Fun with spock (NativeBoost FFI)

2012-05-13 Thread Lawson English
[pharo-project list added back in] On 5/13/12 1:34 PM, Nicolas Cellier wrote: [10 primeSwingFactorial] timeToRun 3411 [10 factorial] timeToRun 61219 So gmp is still 40x faster than a reasonably optimized Smalltalk factorial... I think that's fair, because gmp is highly optimized.

Re: [Pharo-project] [squeak-dev] Fun with spock (NativeBoost FFI)

2012-05-13 Thread Igor Stasenko
On 14 May 2012 00:03, Lawson English lengli...@cox.net wrote: [pharo-project list added back in] On 5/13/12 1:34 PM, Nicolas Cellier wrote: [10 primeSwingFactorial] timeToRun 3411 [10 factorial] timeToRun 61219 So gmp is still 40x faster than a reasonably optimized Smalltalk