On Thursday, September 17, 2015 at 9:46:05 PM UTC-4, Stefan Karpinski wrote:
>
> That's quite nice. The Julia version 
> <https://github.com/stevengj/Sobol.jl/blob/master/src/Sobol.jl> is pretty 
> short? Is the C version much longer?
>

The C version is about the same length (maybe 20-40 lines longer): 
https://github.com/stevengj/nlopt/blob/master/util/sobolseq.c

It is interesting to compare to the Python version; most people seem to use 
an implementation based on Burkardt's code, e.g.
      
https://github.com/naught101/sobol_seq/blob/master/sobol_seq/sobol_seq.py
This looks likely to be rather slow to me, although I haven't benchmarked 
it, and is quite a bit uglier, probably because you can't easily declare a 
UInt32 in Python and do the natural bitwise operations on it.

(Mathworks provides a built-in sobolset function, but the core computation 
seems to be in mex files.)

Generation of low-discrepancy sequences like Sobol sequences seems 
inherently hard to vectorize, so it is a challenge for traditional dynamic 
languages.

Reply via email to