Re: [polyml] Using a finalizer with multiple arguments

2015-09-21 Thread Phil Clayton
21/09/15 18:41, David Matthews wrote: On 21/09/2015 16:08, Phil Clayton wrote: What I am actually observing is that finalizers are not run on exit for finalizable values that are in scope in the top-level environment. On exit, the REPL has finished, so shouldn't such values be garbage

Re: [polyml] FFI overhead

2015-09-21 Thread David Matthews
On 21/09/2015 06:49, Artella Coding wrote: Hi, thanks for the pointers on the ffi. "I strongly suspect that SML functions like IntArray.update take less time than the FFI overhead, so no improvement is possible by using C functions." Yes it seems so. I was hoping that I could somehow achieve

Re: [polyml] Using a finalizer with multiple arguments

2015-09-21 Thread David Matthews
On 21/09/2015 16:08, Phil Clayton wrote: What I am actually observing is that finalizers are not run on exit for finalizable values that are in scope in the top-level environment. On exit, the REPL has finished, so shouldn't such values be garbage collected and therefore finalized? I noticed

Re: [polyml] FFI overhead

2015-09-21 Thread Artella Coding
Thanks. Someone (just now) on stackoverflow suggested doing a search for the unsafe keyword, which led me to "unsafeSub" and "unsafeUpdate". When I add these function definitions to my program the timings do indeed reduce from 52s to 32s. On Mon, Sep 21, 2015 at 1:10 PM, David Matthews <