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 collected

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 < david.mat

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 t

Re: [polyml] Using a finalizer with multiple arguments

2015-09-21 Thread Phil Clayton
19/09/15 13:11, David Matthews wrote: On 19/09/2015 12:30, Phil Clayton wrote: Much appreciated. For now I'd like to get a version working on top of 5.5.2, and I assume assignment will suffice there. Is there a way to create a non-overwritable ref in a normal session? I don't seem to be able

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 th