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

Cythonize some hotspots #55

Merged
merged 21 commits into from
Jul 3, 2018
Merged

Cythonize some hotspots #55

merged 21 commits into from
Jul 3, 2018

Commits on Jun 26, 2018

  1. Basic cythonization of datastructures, externalization, internalizati…

    …on and singleton. No optimizations yet. All tests pass.
    jamadden committed Jun 26, 2018
    Configuration menu
    Copy the full SHA
    cf871af View commit details
    Browse the repository at this point in the history
  2. Add cython to travis.

    jamadden committed Jun 26, 2018
    Configuration menu
    Copy the full SHA
    fa77efa View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5ced9a2 View commit details
    Browse the repository at this point in the history
  4. cython optimize singleton.py

    jamadden committed Jun 26, 2018
    Configuration menu
    Copy the full SHA
    fe925a8 View commit details
    Browse the repository at this point in the history
  5. Checkpoint on cython declarations. About a 3-5% improvement over the …

    …naive version so far. Hopefully we can get better still.
    jamadden committed Jun 26, 2018
    Configuration menu
    Copy the full SHA
    06dbfdb View commit details
    Browse the repository at this point in the history
  6. More externalization work: declare attributes for state management

    This was a pretty big win, getting us 9-13% faster on the
    externalization benchmarks compared with the last commit.
    jamadden committed Jun 26, 2018
    Configuration menu
    Copy the full SHA
    7750157 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4c62daf View commit details
    Browse the repository at this point in the history
  8. Our thread-local data is simple enough (and read/written in only one …

    …place) so it can be a tuple. This is again slightly faster.
    jamadden committed Jun 26, 2018
    Configuration menu
    Copy the full SHA
    0290392 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2018

  1. Configuration menu
    Copy the full SHA
    e1f69e1 View commit details
    Browse the repository at this point in the history
  2. Update comment.

    jamadden committed Jun 27, 2018
    Configuration menu
    Copy the full SHA
    232b089 View commit details
    Browse the repository at this point in the history
  3. Now that I understand that it's *types* that cause the problem with l…

    …eading underscores, rename our private module back to private again.
    jamadden committed Jun 27, 2018
    Configuration menu
    Copy the full SHA
    f9a9592 View commit details
    Browse the repository at this point in the history
  4. More typing in datastructures.py

    This nets us a 4% improvement or so in externalization, maybe a tiny
    slowdown in internalization (but I expect that to be fixed when I type
    that module).
    
    We could do better, but the class attribute _ext_excluded_out_ and the
    like are slowing us down, and we have some code that doesn't keep
    their usual types (mostly in housing). A metaclass may be able to fix
    that, because they all seem to be defined at the class level.
    jamadden committed Jun 27, 2018
    Configuration menu
    Copy the full SHA
    b20aed4 View commit details
    Browse the repository at this point in the history
  5. Learn how to do enumerated constants as class bodies in cython

    Define them as an instance, make an accessor function, type the result
    of the accessor in the pxd. This avoids needing to get the type in the
    python file, which is what causes the leading underscore problems.
    
    This avoids the need for re-enumerating all the constants while still
    being direct access (yay!). Speeds things up by another percent or two
    in datastructures.py.
    jamadden committed Jun 27, 2018
    Configuration menu
    Copy the full SHA
    bed7e65 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2018

  1. First part of typing internalization.py. Roughly 3-5% further improve…

    …ment on the benchmarks, it appears.
    jamadden committed Jun 28, 2018
    Configuration menu
    Copy the full SHA
    1627cb6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5a57ae8 View commit details
    Browse the repository at this point in the history
  3. More internalization typing.

    jamadden committed Jun 28, 2018
    Configuration menu
    Copy the full SHA
    b979de0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    78c71b5 View commit details
    Browse the repository at this point in the history
  5. Typing and optimizations for notifyModified, one of the biggest remai…

    …ning bottlenecks
    
    Two changes of note:
    - notify_modified alias was removed. I couldn't find any uses of it on github
    - eventFactory was removed from notifyModified. I couldn't find any
      uses of it on github.
    
    These are both easy to add back if needed.
    jamadden committed Jun 28, 2018
    Configuration menu
    Copy the full SHA
    45d5d81 View commit details
    Browse the repository at this point in the history
  6. More static names.

    jamadden committed Jun 28, 2018
    Configuration menu
    Copy the full SHA
    50e55c3 View commit details
    Browse the repository at this point in the history
  7. test coverage

    jamadden committed Jun 28, 2018
    Configuration menu
    Copy the full SHA
    02d5792 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a4946ec View commit details
    Browse the repository at this point in the history