I think we must be talking past each other. Let me try to back out a bit.
It is my understanding that the trie library's slowness that John
reported is all about contract overhead. Specifically, there are some
(effectively) lazy contracts on the trie structs that pile up, leading
to surprisingly bad performance and that these contracts are generated
by TR.
Our initial round of discussion came to the conclusion there's no
simple fix to TR or the contract system that can avoid this overhead.
So, instead of adding a big warning to the trie library (that Asumu
rightly is not excited about :), we could use TR's unsafe require
support to implement a small wrapper file that does a more efficient
version of the contract checking and then John's problem would be
fixed.
Over the period between the current and next release we could, in
addition, improve TR and the contract system to the point where that
wrapper file isn't necessary. That seems good too. It also seems
useful to have the short-term fix as part of doing the longer-term fix
because that will help us be sure we've really gotten the right
contracts in there by comparing the performance of the two versions.
Does this make sense as the right way to proceed?
Robby
On Fri, Jan 8, 2016 at 8:49 AM, Sam Tobin-Hochstadt