Welcome to Gaming! Come chat with us in the GoatChat network (desktop users click here). We also have an Official Steam Group.
All sub rules are defined in detail here and open for feedback
-
Submissions must be related to gaming.
-
Titles must be clear and reflect content of the submission. Include game titles where necessary.
-
No Clickbait (defined).
-
No links to illegal torrents or other illegal downloads/content.
-
No link posts to merchandise and/or unrelated products (exceptions).
-
Mark all spoilers with: [](#s "Text goes here")
-
Mark all NSFW posts appropriately.
-
Submissions reposted within 6 months will be removed.
Content creators, please read our community Content Creator Guidelines
What you're encouraged to post:
Games! We should talk about games more than anything! New releases, old favorites, Speed Runs, Let's Play's, development news, what we love, what we hate and so on and so forth.
Try to post things that create discussion. We want people to feel engaged and feel their voices are heard, rather than to be a place of disposable content.
If you're not sure, ask!
If you wish to, you can archive your posts here.
Check out v/gaming's megathread of gaming-related subverses
view the rest of the comments →
[–] enneract ago (edited ago)
So the trade-off here is increased memory usage. On the other hand, there is no garbage collector in C++, so programs written in it can both be fast and not waste memory.
Branch predictors aren't perfect though, and mispredictions can be very costly. If you want speed, you want as few branches as possible (so as few run-time checks as possible).
[–] 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.