diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-08-23 13:47:37 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-08-25 23:21:28 -0600 |
commit | 15896d2f753bef49b0736f497e92161d548b0a87 (patch) | |
tree | 55c5cd3064622292078ea6d03e95bce3f68d617d /embed.fnc | |
parent | f0fdc1c93fe4410df3f4f4d0c836005cec3b7f55 (diff) | |
download | perl-15896d2f753bef49b0736f497e92161d548b0a87.tar.gz |
Add caching to inversion list searches
Benchmarking showed some speed-up when the result of the previous
search in an inversion list is cached, thus potentially avoiding a
search in the next call. This adds a field to each inversion list which
caches its previous search result.
Diffstat (limited to 'embed.fnc')
-rw-r--r-- | embed.fnc | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1391,7 +1391,10 @@ EiMR |UV* |invlist_array |NN SV* const invlist EsM |void |invlist_extend |NN SV* const invlist|const UV len EiMR |UV* |get_invlist_zero_addr |NN SV* invlist EiMR |UV |invlist_max |NN SV* const invlist -EiM |void |invlist_set_len |NN SV* const invlist|const UV len +EiM |void |invlist_set_len|NN SV* const invlist|const UV len +EiMR |IV* |get_invlist_previous_index_addr|NN SV* invlist +EiMR |IV |invlist_previous_index|NN SV* const invlist +EiM |void |invlist_set_previous_index|NN SV* const invlist|const IV index EiM |void |invlist_trim |NN SV* const invlist EiMR |SV* |invlist_clone |NN SV* const invlist EiMR |UV* |get_invlist_iter_addr |NN SV* invlist |