3 ms·
And then the Java etc programs are re-written to do the same and the test value is increased (to compensate for the reduced memory allocation) and we're back wh
by igouy 4y ago
And then the Java etc programs are re-written to do the same and the test value is increased (to compensate for the reduced memory allocation) and we're back where we started?
Seems like moving the furniture around.
No doubt I've misunderstood.
- morelisp 4y agoA null value in Java has no methods / is not an object. I didn’t precompute anything.
- igouy 4y agoafaict you're making a distinction without a difference. afaict the Java etc programs could be re-written using null where you used nil — please explain why you think that isn't correct.
- morelisp 4y agoYou cannot call a method on null. Meaning: - Practically, Java would rather have to `return 3` when it detects a null child, effectively precomputing the penultimate level. - Semantically, Java could no longer distinguish between an absent child and a child with no children. Honestly, I have other variants that still don't use pooling but are less idiomatic; I find this exercise is begging the question hard. Any tools, however idiomatic, the language is giving you to reduce the effects of allocation seem to be off-limits for GCd languages. Whereas then e.g. C can just throw them all in a third-party pool library. And JIT languages are presumably allowed to fuse anything they want.
- igouy 4y agoI think you just said the Java etc programs could be re-written in a similar way? And we could add some more rules ("distinguish between an absent child and a child with no children") to reject those Java etc programs.
- morelisp 4y ago> I think you just said the Java etc programs could be re-written in a similar way? I could rewrite the Go program to return 3 too, but I doubt you’d accept that. I can only conclude the benchmarks game is bad-faith bullshit at this point.
- igouy 4y ago> … bad-faith bullshit… Kudos for actually bothering to "read the rules". None for ignoring what you read. The answer to "… but if my language lets me not allocate a node yet still use that node why should I?" is — Because allocate a node is the basis of comparison with the other programs! Change that for the Go programs and you change that for all the other programs; otherwise just special pleading for Go lang.
- deleted 4y ago[deleted]