aplbrain / grandiso-networkx

Performant, pure-Python subgraph isomorphism and monomorphism search (aka "motif search")
Apache License 2.0
52 stars 10 forks source link

Memoize nodematch function calls #19

Closed j6k4m8 closed 3 years ago

j6k4m8 commented 3 years ago

This adds a LRU-cache to the node match function calls, which greatly reduces the worst-case performance of subgraph search.

codecov-commenter commented 3 years ago

Codecov Report

Merging #19 (2ea54f3) into master (8c6fc0d) will increase coverage by 0.66%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #19      +/-   ##
==========================================
+ Coverage   95.41%   96.08%   +0.66%     
==========================================
  Files           5        5              
  Lines         480      485       +5     
==========================================
+ Hits          458      466       +8     
+ Misses         22       19       -3     
Impacted Files Coverage Δ
grandiso/__init__.py 88.54% <100.00%> (+2.83%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8c6fc0d...2ea54f3. Read the comment docs.