Skip to content

Fixed Lua timeit(), ported to SciLua. #14297

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

Merged
merged 2 commits into from
Dec 8, 2015
Merged

Fixed Lua timeit(), ported to SciLua. #14297

merged 2 commits into from
Dec 8, 2015

Conversation

stepelu
Copy link
Contributor

@stepelu stepelu commented Dec 6, 2015

This closes #14222.

To install SciLua, the easiest way is:

wget http://ulua.io/download/ulua~latest.zip
unzip ulua~latest.zip

export BIT=64                         # Use LuaJIT for x64
yes | ./ulua/bin/upkg add time        # For timing
yes | ./ulua/bin/upkg add sci-lang    # SciLua

The benchmark is then run using ulua/bin/scilua followed by the path of perf.lua.
It should be run in x64 mode (hence the environment variable BIT=64) because OpenBLAS performance under x86 is affected.

ULua is updated by running upkg update.

Alternatively, it is also possible to install LuaJIT from source and download all the Lua modules required to run the benchmark, in which case the system OpenBLAS would be used.
Please advise if this solution would be preferred (I am not sure of the advantages for you though, as it will probably result in more work).

@ViralBShah ViralBShah added the potential benchmark Could make a good benchmark in BaseBenchmarks label Dec 7, 2015
@ViralBShah
Copy link
Member

An unrelated comment - perhaps we should have docker containers of various platforms to run these benchmarks.

@ViralBShah
Copy link
Member

We are trying to move all the benchmarks for mandel to use 2d array indexing. Some of the benchmarks use 1d indexing, which is a bit unfair. Since you have reworked this code recently, can you make it use 2d indexing as well - like the julia and matlab codes (and unlike the C code)?

@ViralBShah
Copy link
Member

See #13729 and #13673

@stepelu
Copy link
Contributor Author

stepelu commented Dec 7, 2015

Sure, that's fair, I have updated the PR.

SciLua doesn't have Julia's comprehensions (I though about adding them but I'm not convinced yet), but I am creating a matrix and indexing it as a 2D array. The code is representative of how I would implement comprehensions in SciLua if I were to.

I am not using Lua's for loop syntax for i=lower,upper,increment because it's semantically different from Julia's for i=lower:increment:upper.

This version is also using alg.sum(), so make sure SciLua it's up-to-date (upkg update).
Let me know if there is anything else what would need fixing.

@ViralBShah
Copy link
Member

Thank you for updating it. Julia's comprehension also generates a 2D array - it is just convenient syntax.

ViralBShah added a commit that referenced this pull request Dec 8, 2015
Fixed Lua timeit(), ported to SciLua.
@ViralBShah ViralBShah merged commit c910d63 into JuliaLang:master Dec 8, 2015
tkelman pushed a commit that referenced this pull request Jan 9, 2016
@jrevels jrevels removed the potential benchmark Could make a good benchmark in BaseBenchmarks label Jan 27, 2016
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

Successfully merging this pull request may close these issues.

LuaJIT / Julia unfair benchmarking
4 participants