cperciva's comment there also generalizes to cryptographic protocols which sometimes require batch inversion (i.e. given a1, ..., an \in F, find out all a1^{-1}, ..., an^{-1}; e.g. when converting a bunch of EC points from projective to affine coordinates), and is there known as "Montgomery's trick" (separate from Montgomery modular multiplication). That is, you trade n inversions for 3(n-1) multiplications and one inversion.
No long required and regex search (not that it is needed here). Plus it searches GitLab too. (I think there is a repo limit though based on popular repos)
Touché, I edited it. I still thought it's worth keeping the comment because people might not always realise how useful these hacks can be when performance is important e.g. games.
One of the biggest eye-openers to me once I hit "the real world" was how many wildly different interpretations of the word "engineering" there are.
At one end of the scale you have people who equate it entirely with methodology and process, and at the other you have people who equate it with building a high performance system.
Engineering would be how you test it, how you document it, how you maintain it, how you deploy it. Implementing other peoples algorithms is just programming/coding.
The problem with that redefinition is that you spontaneously transform into an engineer when working on your own personal library, but as soon as you pull in a single dependency, or manually punch in some old school approximation algorithm, you are "just" some dirty good for nothing code janitor.
Imagine somebody tasked with designing a bridge abandoning their engineering mindset because they used somebody else's drafting table. Also, that engineer better be "just" implementing other peoples algorithms on that bridge design - I'm not interested in driving across some 10Xer's suspension bridge.
0x7FDE623822FC16E6 : a magic constant for double float reciprocal - https://news.ycombinator.com/item?id=2335025 - March 2011 (1 comment)