| ▲ | KerrAvon 5 hours ago | |||||||
Why are you surprised? Java always suffers from abstraction penalty for running on a VM. You should be surprised (and skeptical) if Java ever beats C++ on any benchmark. | ||||||||
| ▲ | pron 4 hours ago | parent | next [-] | |||||||
The only "abstraction penalty" of "running on a VM" (by which I think you mean using a JIT compiler), is the warmup time of waiting for the JIT. | ||||||||
| ||||||||
| ▲ | woooooo 5 hours ago | parent | prev [-] | |||||||
For the most naive code, if you're calling "new" multiple times per row, maybe Java benefits from out of band GC while C++ calls destructors and free() inline as things go out of scope? Of course, if you're optimizing, you'll reuse buffers and objects in either language. | ||||||||