Re: Debugging the compiler

2016-08-23 Thread mbaulch
Thanks for your efforts @mora. The output looks like it could be very useful. Learning, debugging? Haven't quite decided. Something, I'm sure. Hope to have a play with it soon. Cheers.

Re: Cannot load shared library when using -d:release?

2016-08-20 Thread mbaulch
test.nim fails for me with GCC ('could not load: libRmath-nim.so') but not with Clang. Rarely does failure make me so happy! Thanks.

Re: Cannot load shared library when using -d:release?

2016-08-18 Thread mbaulch
Originally compiled my own libRmath-nim.so but tried using the nimble-pkg provided copy instead (via LD_LIBRARY_PATH). Still same result. My C compilers are slightly older. Clang 3.6, GCC 4.8.4. I'd be surprised if that made a difference. I'm assuming, @andrea, that gibbs succeeds for you with

Re: Cannot load shared library when using -d:release?

2016-08-18 Thread mbaulch
Have just built _distributions_ and libRmath-nim. sir.nim and gibbs.nim both compile (and run) successfully for me in both release and debug modes, for Nim 0.14.2 and Nim devel. I'm on Linux x86_64. Have tried both GCC and Clang. What configuration is causing the issue?

Re: Cannot load shared library when using -d:release?

2016-08-16 Thread mbaulch
This is only a guess, but I wonder if _dead code elimination_ is (for some reason) removing the hooks to your library. Try compiling with nim c -d:release --deadCodeElim:off sir instead. Does that help?

Re: FastStack - dynamically resizable data structure optimized for fast iteration

2016-08-15 Thread mbaulch
My apologies. I only looked at seq and (mistakenly) assumed all were faster. On my (rather slow) laptop, the results of the ptr benchmark are refc: Sequence 2.70ms/iter List 2.99ms/iter FastStack 2.23ms/iter Boehm: Sequence 2.43ms/iter List

Re: FastStack - dynamically resizable data structure optimized for fast iteration

2016-08-15 Thread mbaulch
With the Boehm GC, seq is faster in both of your benchmarks. The default ref-counting GC definitely has limitations. Also, it's probably better to initialise FastStack to the same capacity as the seq. 1000 vs 0 isn't really fair.