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.h | |
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.h')
-rw-r--r-- | embed.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -914,6 +914,7 @@ #define cl_or S_cl_or #define compute_EXACTish(a) S_compute_EXACTish(aTHX_ a) #define get_invlist_iter_addr(a) S_get_invlist_iter_addr(aTHX_ a) +#define get_invlist_previous_index_addr(a) S_get_invlist_previous_index_addr(aTHX_ a) #define get_invlist_version_id_addr(a) S_get_invlist_version_id_addr(aTHX_ a) #define get_invlist_zero_addr(a) S_get_invlist_zero_addr(aTHX_ a) #define grok_bslash_N(a,b,c,d,e,f) S_grok_bslash_N(aTHX_ a,b,c,d,e,f) @@ -924,7 +925,9 @@ #define invlist_iterinit(a) S_invlist_iterinit(aTHX_ a) #define invlist_iternext(a,b,c) S_invlist_iternext(aTHX_ a,b,c) #define invlist_max(a) S_invlist_max(aTHX_ a) +#define invlist_previous_index(a) S_invlist_previous_index(aTHX_ a) #define invlist_set_len(a,b) S_invlist_set_len(aTHX_ a,b) +#define invlist_set_previous_index(a,b) S_invlist_set_previous_index(aTHX_ a,b) #define invlist_trim(a) S_invlist_trim(aTHX_ a) #define join_exact(a,b,c,d,e,f,g) S_join_exact(aTHX_ a,b,c,d,e,f,g) #define make_trie(a,b,c,d,e,f,g,h) S_make_trie(aTHX_ a,b,c,d,e,f,g,h) |