diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-09-28 22:30:01 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-09-28 22:30:01 -0700 |
commit | 3d707aee9ae403bde7ffb69062a29086a7265a5d (patch) | |
tree | 57626943165c8626cb9549d16a266436fc7a6880 /regex.h | |
parent | 9c2cf56174660ec9e5382025003106a4986c8cb4 (diff) | |
download | txr-3d707aee9ae403bde7ffb69062a29086a7265a5d.tar.gz txr-3d707aee9ae403bde7ffb69062a29086a7265a5d.tar.bz2 txr-3d707aee9ae403bde7ffb69062a29086a7265a5d.zip |
Improve performance of lazy string forcing.
* lib (lazy_str_force, lazy_str_force_upto): The existing
algorithm keeps catenating pieces onto a string, which
triggers wasteful reallocations and is quadratic.
This is replaced with a different approach: we collect
pieces into a list, and then make a single call to
cat_str.
Diffstat (limited to 'regex.h')
0 files changed, 0 insertions, 0 deletions