librasn / compiler

An ASN1 compiler producing Rust bindings for the rasn framework
Other
10 stars 7 forks source link

Performance: Reduce Clones #15

Open 6d7a opened 5 months ago

6d7a commented 5 months ago

Since performance has not been a priority in the compiler's development, the compiler currently clones all over the place. Strings that reference another data type from the module that is compiled are particularly prone to being cloned. These could be easily replaced with Cows or similar borrowing types. Similarly, the map of TopLevelDeclarations is cloned in some places in the validator module.