Weekly Report 2024.21

what matters eventually?

穷人一直在学习, 富人一直在行动. Only action will bring you results. Wonder will always be wonder.

Entertainment

物語の黒幕に転生して

I kinda love the “boy meets girl” story.

Life

  • the un-lived weekends continues

Collectibles

sharing

Knowing virtues is like having a map; adopting them is actually taking the journey.

learn

  • https://gaultier.github.io/blog/you_inherited_a_legacy_cpp_codebase_now_what.html
    • how to deal with inherited legacy codebase
  • https://news.ycombinator.com/item?id=39564632
    • how can I learn about performance optimization
      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.

  • get things done
    • capture
    • clarify
    • organize
    • reflect
    • engage
Licensed under CC BY-NC-SA 4.0
Last updated on Jan 09, 2024 11:32 CST
The older I get, the more I realize that most of life is a matter of what we pay attention to, of what we attend to [with focus].
Built with Hugo
Theme Stack designed by Jimmy