I started looking at buttwoo again to see where the bottleneck is and found that BFE encode / decode are really quite slow. Using the benchmark in db2 and ebt I tracked the problem down to slow decoding in BFE and then slow encoding in uri2 because of new URI instead of just doing substring. This takes care of the latter and makes encoding roughly 2x faster.
Context:
I started looking at buttwoo again to see where the bottleneck is and found that BFE encode / decode are really quite slow. Using the benchmark in db2 and ebt I tracked the problem down to slow decoding in BFE and then slow encoding in uri2 because of new URI instead of just doing substring. This takes care of the latter and makes encoding roughly 2x faster.