You are viewing a single comment's thread.

view the rest of the comments →

0
0

[–] rwbj ago 

There's really no trade off in the garbage collector. You can deterministically execute it you so desire. All it does is ensure that you don't inadvertently leak memory to a point that it begins impacting your application or system's performance. If your application does not use significant memory - it will never run. If your application does use significant memory, and you'd like to free it - then you're also free to do that.

Branch misprediction on a bounds check means you just hit an exception, which is probably and should be fatal, in which case the misprediction cost is irrelevant.