4 ms·
> I think people care about performance without thinking about what exactly the bottleneck is Some of us are just permanently immersed in performance critical
by MaulingMonkey 6y ago
> I think people care about performance without thinking about what exactly the bottleneck is
Some of us are just permanently immersed in performance critical stuff. In gamedev, a single millisecond is a significant chunk of my per-frame budget and can stick out like a sore thumb in my profiling flamegraphs as an optimization opportunity / potential cause for hitching.
Pure functional code still has plenty of uses in this environment, but we've also got large chunks of our codebases dedicated to mutating external state (GPUs, Network IO, etc.) in horrifically performance sensitive ways.
- dnautics 6y ago> In gamedev, a single millisecond is a significant chunk of my per-frame budget and can stick out like a sore thumb in my profiling flamegraphs as an optimization opportunity / potential cause for hitching Yes, but what is the relative portion of gamedevs among all devs? These people know who they are and they should absolutely obsess over performance. Everyone else should stop and think first. Okay, okay. I'll make another carveout for certain classes of HPC. But even here, as the joke goes, HPC is the art of taking a CPU-bound task and turning it into an IO-bound task. I have heard of HPC people optimizing their numpy application to really run like the dickens on an HPC cluster, the scale their deploy from 1 to 40,000 nodes, and have the filesystem lock up for hours on what should be a 15 minute task due to the way python takes out r/w transactional locks on each and every one of its import statements.
- blondin 6y agoi am sorry. the larger population of devs care too! bigger players have conditioned us to think that the status quo is normal. and this is working pretty well on those who haven't been around for a while. those who have been around for a while are flabbergasted. dreams of seeing software loading right away and doing things of the past for them hasn't come true. note: things of the past (like loading up a text editor or an image!) the excitement generated by unreal 5 proves that the status quo is not acceptable. we should be expecting much more.
- dnautics 6y ago> i am sorry. the larger population of devs care too! Yeah. My point is, not that they shouldn't care but WHEN they should care. They should build their system, then measure the bottleneck. I would bet that 4 times out of 5 their initial intuitions are wrong.
- MaulingMonkey 6y ago> I'll make another carveout for certain classes of HPC. And embedded. And anything RTOS. And kernel devs. Video encoders. And even some backend webdev stuff for scaling purpouses. And high performance logging systems. And ...
- dnautics 6y agoIf you took a dev out of any of those categories, only the rtos engineer would be competent at knowing where the bottleneck lies before profiling.
- pinopinopino 6y ago>a single millisecond is a significant chunk of my per-frame budget Interesting stuff, is that really a thing? Do you also have tools to measure this? I am genuinely interested, I like working under constraints, it makes programming more interesting. My main constraint is budget and total runtime of a job.
- arcin 6y agoYep this is really a thing. Game dev is an example of a realm where performance really matters and you need to tune that code to its target hardware, or some common denominator. Vtune is a pretty accessible tool if you want to profile your code on a Intel CPU. Also, rad game tools is a company that makes very useful tools for profiling. I'm not in the gaming industry but the software I work on has a lot of visualization and physics simulations, so it's similar. It's definitely a different set of constraints, you deal with abstraction a lot less as well. I'd highly recommend giving something like game dev a try, even if it's just as a side project. Handmadehero.org has great content. It's a breath of fresh air if you're coming from something like web development.
- MaulingMonkey 6y ago>> Interesting stuff, is that really a thing? To maintain 30FPS you must finish a frame in 33ms (1000ms/30). To maintain 60FPS you must finish a frame in 16ms. Some of the VR literature I've read has recommended 90FPS or higher to combat nausea - 11ms. A millisecond could easily be 1/10th of your entire frame budget for the whole game's per-frame processing time, to say nothing of individual subsystems. At least we have multiple cores, but some stuff must run on the main thread... > Also, rad game tools is a company that makes very useful tools for profiling. arcin is of course referring to Telemetry[1] here, a wonderful tool for generating explicitly annotated flamegraphs that I've helped integrate into multiple codebases at different jobs. Engine-custom[2] tooling is also common, where you're seeing scopes measure in microseconds. There's a bunch of FOSS alternatives[3] of varying quality / functionality - nothing that's put Telemetry out of business for me yet though. "I'll write one myself for Rust someday!" I keep telling myself ;) [1] http://www.radgametools.com/telemetry.htm http://www.radgametools.com/telemetry.htm [2] https://www.youtube.com/watch?v=DMO4X9leTG8 https://www.youtube.com/watch?v=DMO4X9leTG8 [3] https://github.com/jonasmr/microprofile https://github.com/jonasmr/microprofile https://github.com/Celtoys/Remotery https://github.com/Celtoys/Remotery https://github.com/loganek/hawktracer https://github.com/loganek/hawktracer https://github.com/google/orbit https://github.com/google/orbit