|
|
|
|
|
by lelanthran
1634 days ago
|
|
> Did you also implement object pooling for the Java variant (commonly used in high perf apps)? In the specific case I don't think you need to; I've seen generated code (from java sources) simply reuse an object in a tight loop. IOW, it doesn't allocate new memory for the instance within a loop, for each invocation of the loop. The memory for the instance is allocated once and then reused. (For a small allocation (a small instance) I would expect a smart compiler to not allocate anything and simply create the for-loop instance on the stack). |
|