emproof-com / nyxstone

Nyxstone: assembly / disassembly library based on LLVM, implemented in C++ with Rust and Python bindings, maintained by emproof.com
https://www.emproof.com
MIT License
321 stars 16 forks source link

[Rust] Revise the feature string creation #33

Closed seritools closed 1 year ago

seritools commented 1 year ago

Probably pretty minor, but the feature string buildup in NyxstoneBuilder::build is pretty inefficient, needing to likely reallocate all the feature string in order to add the + or -, and needing an extra intermediary vector. All of it can be avoided by manually building up inside the final string directly.