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

Keep modules as locals when possible #839

Merged
merged 21 commits into from Jul 4, 2018

Conversation

Projects
None yet
2 participants
@patiences
Contributor

patiences commented Jun 15, 2018

No description provided.

@patiences

This comment has been minimized.

Contributor

patiences commented Jun 18, 2018

Benchmarking test for loading global variables here. Some stats at this point:

Without optimization

Running test_loads
  Elapsed time:  61.447008085029665  sec
  CPU process time:  10.024515999999998  sec
Running test_loads
  Elapsed time:  61.878539645986166  sec
  CPU process time:  9.702131999999999  sec
Running test_loads
  Elapsed time:  61.865173934958875  sec
  CPU process time:  9.656627  sec
Running test_loads
  Elapsed time:  62.24996647500666  sec
  CPU process time:  9.936633  sec

With optimization

Running test_loads
  Elapsed time:  36.743622453010175  sec
  CPU process time:  8.90975  sec
Running test_loads
  Elapsed time:  38.39133337204112  sec
  CPU process time:  9.475329  sec
Running test_loads
  Elapsed time:  37.19154859299306  sec
  CPU process time:  8.950337999999999  sec
Running test_loads
  Elapsed time:  36.41155601700302  sec
  CPU process time:  8.750753  sec
@patiences

This comment has been minimized.

Contributor

patiences commented Jun 18, 2018

Test for class variables here. More numbers for class variable optimizations:

Without optimization

Running test_class_var_load
  Elapsed time:  41.99330894899322  sec
  CPU process time:  7.8091740000000005  sec
Running test_class_var_load
  Elapsed time:  42.89765899197664  sec
  CPU process time:  7.820375  sec
Running test_class_var_load
  Elapsed time:  42.63216649304377  sec
  CPU process time:  7.784223999999999  sec
Running test_class_var_load
  Elapsed time:  44.22583248699084  sec
  CPU process time:  8.168614  sec

With optimization

Running test_class_var_load
  Elapsed time:  31.45843087998219  sec
  CPU process time:  7.383700999999999  sec
Running test_class_var_load
  Elapsed time:  33.663975150033366  sec
  CPU process time:  8.229892000000001  sec
Running test_class_var_load
  Elapsed time:  33.1333520799526  sec
  CPU process time:  7.8959220000000006  sec
Running test_class_var_load
  Elapsed time:  33.31698497297475  sec
  CPU process time:  7.602885  sec

@patiences patiences changed the title from [WIP] Keep modules as locals when possible to Keep modules as locals when possible Jun 19, 2018

@patiences

This comment has been minimized.

Contributor

patiences commented Jun 21, 2018

Test for local variables in functions here. Results:

Without optimization

Running test_function_var_load
  Elapsed time:  48.14083131996449  sec
  CPU process time:  8.56604  sec
Running test_function_var_load
  Elapsed time:  49.171420827973634  sec
  CPU process time:  9.235756  sec
Running test_function_var_load
  Elapsed time:  49.861631328007206  sec
  CPU process time:  8.593879  sec
Running test_function_var_load
  Elapsed time:  47.639647322008386  sec
  CPU process time:  8.714212000000002  sec

With optimization

Running test_function_var_load
  Elapsed time:  36.17214421299286  sec
  CPU process time:  8.87889  sec
Running test_function_var_load
  Elapsed time:  38.027088380011264  sec
  CPU process time:  8.931876  sec
Running test_function_var_load
  Elapsed time:  38.70553471700987  sec
  CPU process time:  9.243238  sec
Running test_function_var_load
  Elapsed time:  38.75832613901002  sec
  CPU process time:  9.411923999999999  sec

@patiences patiences force-pushed the patiences:module-opt branch from 9619208 to 401804e Jun 28, 2018

patiences added some commits Jun 29, 2018

@freakboy3742

👍

@freakboy3742 freakboy3742 merged commit 1b03783 into pybee:master Jul 4, 2018

5 checks passed

beekeeper:0/beefore:javacheckstyle Java lint checks passed.
Details
beekeeper:0/beefore:pycodestyle Python lint checks passed.
Details
beekeeper:1/smoke-test Smoke build (Python 3.4) passed.
Details
beekeeper:2/full-test:py3.5 Python 3.5 tests passed.
Details
beekeeper:2/full-test:py3.6 Python 3.6 tests passed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment