@rovarma@mastodon.gamedev.place
@rovarma@mastodon.gamedev.place avatar

rovarma

@rovarma@mastodon.gamedev.place

Building Superluminal (https://www.superluminal.eu / https://mastodon.gamedev.place/@superluminal), a user-friendly CPU sampling profiler for C/C++, Rust & .NET on Windows & consoles. Ex-Guerrilla Games (H:ZD). Mostly toots about tech.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

pervognsen, to random
@pervognsen@mastodon.social avatar

Two things I hate with the same flavor: Programs that spin up too many compute-bound worker threads and too many parallel downloader threads. Thanks for the DoS, I didn't want to use my computer anyway.

rovarma,
@rovarma@mastodon.gamedev.place avatar

@pervognsen Guilty! Sorry. We really should fix that at some point. We just went with the num_cores - 1 route when we wrote the code in 2017, these crazy core count machines every dev seems to have nowdays weren’t nearly as common back then :-)

rovarma,
@rovarma@mastodon.gamedev.place avatar

@pervognsen @Tramboi It’s an interesting balance. In our case, the job threads are most heavily used when opening a trace to process the data. While we don’t scale linearly with number of threads (due to lock contention etc), the scaling is still pretty good. If we lower the number of threads, it means users actually spend more time waiting for processing to finish. So we try to saturate the job schedulers during processing, in the assumption that the user wants the trace to open ASAP.

rovarma,
@rovarma@mastodon.gamedev.place avatar

@pervognsen @dotstdy @Tramboi I think I’ve seen spinlocks used correctly and for actual perf gains maybe a few times in my career, and that only in highly controlled/predictable environments like consoles (and not windows)

rovarma,
@rovarma@mastodon.gamedev.place avatar

@pervognsen @Tramboi I may have shipped a game on PC once, a long time ago, where some users reported melting PCs when they turned vsync off…

rovarma,
@rovarma@mastodon.gamedev.place avatar

@pervognsen @Tramboi that was in 2009 or 10 tho, and this stuff was newish, not sure there’s an excuse for that today, especially when using a common engine :P

pervognsen, (edited ) to random
@pervognsen@mastodon.social avatar

Was randomly reminded of the most baffling prescription in Uncle Bob's Clean Code book, as summarized here: "He says that an ideal function has zero arguments (but still no side effects?), and that a function with just three arguments is confusing and difficult to test." His actual before-and-after code examples involve regressing to a pre-structured form of programming where even local dataflow is implicit through member variables (i.e. shared state) rather than arguments and return values.

rovarma,
@rovarma@mastodon.gamedev.place avatar

@pervognsen @julesjacobs oh my god, that is hilarious 😂

rovarma,
@rovarma@mastodon.gamedev.place avatar

@pervognsen @julesjacobs I hadn’t really consciously thought about it, but looking back it feels like all the kooky programming stuff was dreamt up back then in the 2000s. XP, TDD, Clean Code, GoF book, Agile, etc. Maybe just a sign of an immature industry? I at least can’t remember similar stuff popping up in the last decade or so, but that may just be a result of not noticing it anymore / having to care due to being out of the workforce / not being a junior programmer anymore.

britown, to gamedev
@britown@mastodon.gamedev.place avatar

Do you use Live++?

https://liveplusplus.tech/

It live-recompiles C++ applications, like if the Edit-and-Continue in Visual Studio actually worked.

This thing changed my life and I don't ever want to go back to not having it.

🧵

rovarma,
@rovarma@mastodon.gamedev.place avatar

@daridrea @britown The combo of Superluminal and Live++ is super good too. Profile app with Superluminal, live code your performance improvements with Live++, reprofile with Superluminal. The profile/optimization loop is sooooo satisfying like that 🤯

(Also, hi! Glad you’re enjoying Superluminal :-)

rovarma, to random
@rovarma@mastodon.gamedev.place avatar

Have been spending the past few weeks in memory profiling/optimization land and boy is this giving me flashbacks to when we decided to start Superluminal.

The tooling for this is so bad, for all the same reasons CPU perf tooling was (is?) bad back then. My hands are itching to do something about this…

rovarma,
@rovarma@mastodon.gamedev.place avatar

@Doomed_Daniel @aras Yeah, I tried this one and think it’s actually the best of the bunch except it has the same fatal flaw all the other ones also have: it’s slow and goes out of memory when trying to analyze large traces.

rovarma, to random
@rovarma@mastodon.gamedev.place avatar

normal people: cache line size

C++: std::hardware_destructive_interference_size

rovarma,
@rovarma@mastodon.gamedev.place avatar

@aras yes

rovarma,
@rovarma@mastodon.gamedev.place avatar

@aras Yeah, it’s peak design by comittee. I’m sure there’s some weird ass niche architecture from 1978 out there that C++ runs on where “cache line size” would have been “technically incorrect”, and thus a new descriptive name covering every possible case ever was bikeshedded.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • ngwrru68w68
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • GTA5RPClips
  • Durango
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • DreamBathrooms
  • provamag3
  • tacticalgear
  • osvaldo12
  • tester
  • cubers
  • cisconetworking
  • mdbf
  • ethstaker
  • modclub
  • Leos
  • anitta
  • normalnudes
  • megavids
  • lostlight
  • All magazines