On 2/9/12 11:49 AM, Marco Leise wrote:
Am 09.02.2012, 20:35 Uhr, schrieb Andrei Alexandrescu
<seewebsiteforem...@erdani.org>:
If we're doing one allocation per
message passed, that might explain the 4x performance difference (I
have no trouble figuring Java's allocator is this much faster than
D's).
Andrei
Well, what does +1 Variant and +1 LinkedListNode sum up to?
Sorry, I don't understand...
Andrei
There are at least 2 allocations, one for the Variant and one for the
new node in the linked list aka message box. But from what you wrote it
sounds like a Variant doesn't allocate unless the contained data exceeds
some internal storage. Sean found another possible allocation in the
other branch of this discussion.
I understand. The good news is, this looks like low-hanging fruit! I'll
keep an eye on pull requests in druntime. Thanks to fellow Romanian
Nicolae Mihalache for contributing the comparison.
Andrei