diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2024-10-09 14:40:35 -0400 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-10-10 18:02:27 +0000 |
| commit | 7a198af7cdb437c5245ac3ab70cb66cef2002d06 (patch) | |
| tree | 1c7270805ff508b297aca4d1e5f89c6464d03838 /include/ruby/internal/intern/array.h | |
| parent | b77ff342ccb1c57a4b6c618e4ddf6bf1fec23a1d (diff) | |
[ruby/prism] Prism::CodeUnitsCache
Calculating code unit offsets for a source can be very expensive,
especially when the source is large. This commit introduces a new
class that wraps the source and desired encoding into a cache that
reuses pre-computed offsets. It performs quite a bit better.
There are still some problems with this approach, namely character
boundaries and the fact that the cache is unbounded, but both of
these may be addressed in subsequent commits.
https://github.com/ruby/prism/commit/2e3e1a4d4d
Diffstat (limited to 'include/ruby/internal/intern/array.h')
0 files changed, 0 insertions, 0 deletions
