Skip to content

(Kind of) fix an update_persistent_hash() performance regression

Matt Wala requested to merge faster-hash-key-building into master

The key builder (701dc4ed) added field names to the hash key which ended up slowing things down.

Example (in pytential test suite, loads ~110 times from cache):

PYOPENCL_TEST=port \
time -p python test_layer_pot_eigenvalues.py \
"test_ellipse_eigenvalues(cl._csc, 1, 5, 3, False)"
real 21.68
user 21.06
sys 2.03
real 27.11
user 26.59
sys 1.94
  • As of this commit:
real 22.29
user 21.90
sys 1.86

This commit doesn't make everything as fast as it used to be because pymbolic expressions are still stringified before hashing. However, caching (#67 (closed)) will eventually help with that too.

Edited by Matt Wala

Merge request reports

Loading