foundry-rs / compilers

Utilities for working with native solc and compiling projects.
Apache License 2.0
58 stars 34 forks source link

perf: reduce size of source map #131

Closed DaniPopes closed 1 month ago

DaniPopes commented 1 month ago

Compresses SourceElement from 40 to 16 bytes. Solc uses int for numbers so 32 bits should be fine to use 32 bit numbers or a bit less.

Source maps can be in the 100K elements for 1MB contracts, so this should help a bit with memory consumption.