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

Speed comparison and parallelization #2

Open
lpvm opened this issue Aug 1, 2017 · 2 comments
Open

Speed comparison and parallelization #2

lpvm opened this issue Aug 1, 2017 · 2 comments

Comments

@lpvm
Copy link

lpvm commented Aug 1, 2017

I compared the time it takes to run both scripts, with 10000000 iteration. 1m32s for the Python version and only 29s for the J's.

If an algorithm is parallelizable, does J use all cores of a CPU?

@ghosthamlet
Copy link
Owner

i am beginner to J, did not manual parallelize this code, can't sure whether the code can auto parallelize, but when i monitor the 4 cpu cores usage on windows, it seems just use one core, it run fast may be as the optimized j interpreter: http://code.jsoftware.com/wiki/Guides/AVX,
and indeed J may use all cores of CPU in some situations, you can see: http://code.jsoftware.com/wiki/User:Devon_McCormick,
http://code.jsoftware.com/wiki/NYCJUG/2010-03-09#Parallel-Programming_Projects_on_the_J_Wiki
http://code.jsoftware.com/wiki/NYCJUG/2010-04-14/ExampleConvertingJCodetoUseMultipleCores

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

3 participants
@ghosthamlet @lpvm and others