Title: During my studies, I was surprised that even a variable swap might be optimized to work in place by using XOR. Since then, I got surprised at least a few times more. For example when I was working a lot with SQL and found some engine-specific optimizations.<p>What were the simplest, or the most clever neat tricks you faced in your career? I mean both things simple and elegant, but also some really dirty hacks it&#x27;s hard to believe can work.
Upvote: