Found 15 bookmarks
Custom sorting
Ask HN: How can I learn about performance optimization? | Hacker News
Ask HN: How can I learn about performance optimization? | Hacker News
1. First and foremost: measure early, measure often. It's been said so often and it still needs repeating. In fact, the more you know about performance the easier it can be to fall into the trap of not measuring enough. Measuring will show exactly where you need to focus your efforts. It will also tell you without question whether your work has actually lead to an improvement, and to what degree.2. The easiest way to make things go faster is to do less work. Use a more efficient algorithm, refactor code to eliminate unnecessary operations, move repeated work outside of loops. There are many flavours, but very often the biggest performance boosts are gained by simply solving the same problem through fewer instructions.3. Understand the performance characteristics of your system. Is your application CPU bound, GPU compute bound, memory bound? If you don't know this you could make the code ten times as fast without gaining a single ms because the system is still stuck waiting for a memory transfer. On the flip side, if you know your system is busy waiting for memory, perhaps you can move computations to this spot to leverage this free work? This is particularly important in shader optimizations (latency hiding).4. Solve a different problem! You can very often optimize your program by redefining your problem. Perhaps you are using the optimal algorithm for the problem as defined. But what does the end user really need? Often there are very similar but much easier problems which are equivalent for all practical purposes. Sometimes because the complexity lies in special cases which can be avoided or because there's a cheap approximation which gives sufficient accuracy. This happens especially often in graphics programming where the end goal is often to give an impression that you've calculated something.
Things that eat CPU: iterations, string operations. Things that waste CPU: lock contentions in multi-threaded environments, wait states.
·news.ycombinator.com·
Ask HN: How can I learn about performance optimization? | Hacker News
I don't think maintaining an implementation of both 'do' and 'undo' sounds fun. Maybe I could write into some temporary state and only "commit" once when I know all operations passed? If that's possible depends on the specifics...
I don't think maintaining an implementation of both 'do' and 'undo' sounds fun. Maybe I could write into some temporary state and only "commit" once when I know all operations passed? If that's possible depends on the specifics...
Also, defer is a great alternative to gotos:) — Jakub Tomšů (@jakubtomsu_)
·x.com·
I don't think maintaining an implementation of both 'do' and 'undo' sounds fun. Maybe I could write into some temporary state and only "commit" once when I know all operations passed? If that's possible depends on the specifics...
Paul Prudence on Twitter / X
Paul Prudence on Twitter / X
There is something more beyond aesthetics and the lineage of programmable machines that connects 'computer-art' with weaving. Like much textile craft there is folk-art aspect to creating art from code that comes through community and the open sharing of patterns and programs... pic.twitter.com/hHUGL4hwkq— Paul Prudence (@MrPrudence) January 4, 2024
·x.com·
Paul Prudence on Twitter / X
Niko McCarty 🧫 on X: "Day 14 of great synthetic biology papers. Storing a video in DNA. “CRISPR–Cas encoding of a digital movie into the genomes of a population of living bacteria,” by Shipman et al. (2017). This is the GIF that made synthetic biology go viral. But how did it actually happen? *****… https://t.co/75cluCpJRa" / X
Niko McCarty 🧫 on X: "Day 14 of great synthetic biology papers. Storing a video in DNA. “CRISPR–Cas encoding of a digital movie into the genomes of a population of living bacteria,” by Shipman et al. (2017). This is the GIF that made synthetic biology go viral. But how did it actually happen? *****… https://t.co/75cluCpJRa" / X
·twitter.com·
Niko McCarty 🧫 on X: "Day 14 of great synthetic biology papers. Storing a video in DNA. “CRISPR–Cas encoding of a digital movie into the genomes of a population of living bacteria,” by Shipman et al. (2017). This is the GIF that made synthetic biology go viral. But how did it actually happen? *****… https://t.co/75cluCpJRa" / X
Maxime on Twitter
Maxime on Twitter
“Finally managed to build a refraction shader I like✨ Being able to get such an effect was my long term goal when I got started with Three.js/React Three Fiber last year Going to further improve this I have so many ideas on how to make this look better! https://t.co/0f3Tivb29T”
·twitter.com·
Maxime on Twitter
AK on Twitter
AK on Twitter
Mubert-Text-to-Music 🎵🎵🎵Colab notebooks demonstrating prompt-based music generation via Mubert APIGitHub: https://t.co/ExdfvXUCrR pic.twitter.com/2Ycwl7RUvX— AK (@_akhaliq) October 19, 2022
·twitter.com·
AK on Twitter
grant on Twitter
grant on Twitter
Here is the relevant code for the pinch gesture, I needed to get my transforms in order. The zoom function is a slight modification of the one in the article. pic.twitter.com/QBdjUEU6Zj— grant (@GrantCuster) September 6, 2022
·twitter.com·
grant on Twitter
rauno on Twitter
rauno on Twitter
I found parallels between SwiftUI and React helpful whilst learning the former. Sharing a few resources that applied this mental model and helped me:https://t.co/QGOZ5xsQsBhttps://t.co/pdNhx3qya3https://t.co/RRZecOCrlihttps://t.co/kdKuFsDT8u— rauno (@raunofreiberg) September 6, 2022
·twitter.com·
rauno on Twitter
Steve Sewell on Twitter
Steve Sewell on Twitter
Make super cool swipe-over sections like Apple in pure CSS!Try it in code: https://t.co/OUvhtQK5IPTry it in @builderio: https://t.co/5RMA37TdIr pic.twitter.com/lOiUdFeHx1— Steve Sewell (@Steve8708) June 25, 2022
·twitter.com·
Steve Sewell on Twitter