optimization: don't store bytestring length when it is statically known #2505
Labels
Optimization
Issues related to compiler optimization
Refactor
Issues related to refactoring the codebase
Simple Summary
The runtime format of a bytestring is like
Don't store the length in memory at runtime if length is statically known, as is known for constants and maybe some other cases.
Motivation
We can improve codesize and memory usage if we don't store the length at runtime if it's statically known. Also this will allow us to store constant bytestrings in the upcoming data section just like immutables (cf #2466).
Backwards Compatibility
Not a user-facing change. Could affect tracers but I am not aware of any tools that trace bytestring constants.
Dependencies
#2466
References
Copyright
Copyright and related rights waived via CC0
The text was updated successfully, but these errors were encountered: