jgarzik / univalue

High performance RAII C++ JSON library and universal value object class
MIT License
55 stars 77 forks source link

Remove hand-coded Univalue destructor. #66

Closed jgarzik closed 4 years ago

jgarzik commented 4 years ago

When the hand-written destructor is removed, the compiler will automatically create a proper one, with correct noexcept. This allows std::vector<UniValue> to be resized without having to copy all elements first, which makes JSON generation of a bitcoin block (as in the benchmark "BlockToJsonVerbose") 25% faster on my machine.

Author: @martinus