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

added @threads benchmark, addresses issue #21 #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

floswald
Copy link
Owner

@floswald floswald commented May 30, 2020

  • tested that solution is the same
  • performance seems very variable and I haven't understood properly why
  • it seems threading works best with not too many shared recources (i.e. narrow parts of the codebase, like some inner loop)
  • it also seemed that 2 threads for 2 discrete choices makes sense.
  • more threads are not beneficial at all (laptop only has 2 physical cores...)

GModel thread at future states iy

using 1 threads
===========================
fedors model on na=5000,ny=50
  10.349 s (2541454 allocations: 6.14 GiB)
general model on na=500,ny=15
  2.698 s (3575181 allocations: 2.86 GiB)
using 2 threads
===========================
fedors model on na=5000,ny=50
  9.139 s (2541712 allocations: 6.14 GiB)
general model on na=500,ny=15
  2.324 s (3579355 allocations: 2.86 GiB)
using 3 threads
===========================
fedors model on na=5000,ny=50
  8.577 s (2541953 allocations: 6.14 GiB)
general model on na=500,ny=15
  2.541 s (3583345 allocations: 2.86 GiB)
using 4 threads
===========================
fedors model on na=5000,ny=50
  10.428 s (2542184 allocations: 6.14 GiB)
general model on na=500,ny=15
  2.802 s (3586972 allocations: 2.86 GiB)

GModel thread at future dchoices

using 1 threads
===========================
fedors model on na=5000,ny=50
  12.048 s (2541454 allocations: 6.14 GiB)
general model on na=500,ny=15
  2.881 s (3691821 allocations: 3.03 GiB)
using 2 threads
===========================
fedors model on na=5000,ny=50
  8.127 s (2541723 allocations: 6.14 GiB)
general model on na=500,ny=15
  2.567 s (3746074 allocations: 3.04 GiB)
using 3 threads
===========================
fedors model on na=5000,ny=50
  8.070 s (2541955 allocations: 6.14 GiB)
general model on na=500,ny=15
  3.068 s (3801400 allocations: 3.05 GiB)
using 4 threads
===========================
fedors model on na=5000,ny=50
  8.006 s (2542194 allocations: 6.14 GiB)
general model on na=500,ny=15
  4.130 s (3854577 allocations: 3.05 GiB)
using 4 threads
===========================
fedors model on na=5000,ny=50
  8.022 s (2542189 allocations: 6.14 GiB)
general model on na=500,ny=15
  3.253 s (3854386 allocations: 3.05 GiB)

@floswald floswald linked an issue May 30, 2020 that may be closed by this pull request
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.

performance: build a multithread version
1 participant