You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
Currently, String terms own their data. Some read-only operations such as slicing make unnecessary copies of data.
This can be optimised by storing data in a separate entity, called Buffer, where Strings themselves only store the pointer to the Buffer and offsets in its data. Buffers could be allocated with a custom allocator for faster allocations, and to introduce some interning for memory usage reduction.
Strings could be further optimised by introducing Copy-on-Write semantics, but this requires investigation whether this would provide any performance gains.
Tasks (each should be a separate PR):
Introduce the concept of Buffers and optimise slices
Implement custom memory area for Buffers and intern small buffers
Investigate Copy-on-Write semantics for Buffers, and implement it would provide decent improvements. Optimize string "mutation" (replacing sub-ranges etc.)
The text was updated successfully, but these errors were encountered:
Currently, String terms own their data. Some read-only operations such as slicing make unnecessary copies of data.
This can be optimised by storing data in a separate entity, called Buffer, where Strings themselves only store the pointer to the Buffer and offsets in its data. Buffers could be allocated with a custom allocator for faster allocations, and to introduce some interning for memory usage reduction.
Strings could be further optimised by introducing Copy-on-Write semantics, but this requires investigation whether this would provide any performance gains.
Tasks (each should be a separate PR):
The text was updated successfully, but these errors were encountered: