--- Comment #12 from Vladimir Panteleev <> 2011-12-28 
14:56:17 PST ---
I spent some more time working on an optimized appender. Things I found:

1) Extra indirection levels are performance killers
2) I failed to create a chained appender (like the one in this patch) that was
faster than a copying one, for my test cases
3) At least on Windows and with short strings, simple slice copy trumps all
memcpy implementations I tried
4) You can write a nextCapacity function with no branches
5) It's better to store an "end" pointer than a "capacity" integer

I put all my attempts and benchmarking code here:

The version I went with is based on fastappender2 in that repo.
The final version is here:

For a chained appender, I would move the tail members into the main structure.
My attempt at a fast chained appender is in fastappender4.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to