Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

benchmark/compare against Burkardt's implementation #4

Open
stevengj opened this issue Sep 18, 2015 · 6 comments
Open

benchmark/compare against Burkardt's implementation #4

stevengj opened this issue Sep 18, 2015 · 6 comments

Comments

@stevengj
Copy link
Member

It would be interesting to compare against this implementation, both for correctness and performance.

@stevengj
Copy link
Member Author

@Ken-B, if you feel like taking a crack at this, it would be much appreciated.

@Ken-B
Copy link
Contributor

Ken-B commented Sep 18, 2015

That's quite a challenge for me, as I've never compiled c++ before. However, with the help of Google I've compiled his code and the example runs. Now I'm trying to build Cxx.jl. I'll keep you posted if any results. Fingers crossed!

@stevengj
Copy link
Member Author

Oh, if it's a bother for you, I can do it myself at some point; I was just thinking of calling/benchmarking it in C++, not in Julia. But I thought you might enjoy taking a crack at it.

@Ken-B
Copy link
Contributor

Ken-B commented Sep 18, 2015 via email

@Ken-B
Copy link
Contributor

Ken-B commented Sep 25, 2015

Cxx.jl requires llvm-svn or llvm 3.7.0, but I keep getting build errors on my mac. I've tried different versions of xcode. Where could I go to get help on that?

I don't think I would be able to manage this soon.

@stevengj
Copy link
Member Author

I ran a little test using this C++ benchmark program. I benchmarked the Julia code using

function nth(s, n)
          x = Vector{Float64}(ndims(s))
          for i = 1:n
             next!(s, x)
          end
          return x
end

to compute the n-th element of a Sobol sequence.

The good news is that the answers match ours in all the cases I tried, and the performance is within a factor of 2.

The bad news is that we are up to 2x slower, so we are leaving some performance on the table. (Note that the C++ code is returning single-precision vectors, whereas we are returning double precision; this is a slight advantage, but I doubt it explains most of the difference.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants