Madhur Chauhan

Results 19 comments of Madhur Chauhan

The reason that stops me from using this is clangd. Clangd being more than a LSP that tightly integrates with the compiler makes programming easy.

Hey @adamant-pwn, it all boils down to memory access patterns. In a benchmark, there will be a tight loop, therefore caching computation will be efficient because there's no work to...

I wrote a benchmark out of curiosity just to test my theory, and it is faster even when there's a "good cache locality". https://quick-bench.com/q/kXvGQ9Jeyscb6yhWcUjCwOlUghI In the best-case scenario, both are...

@adamant-pwn I actually looked at assembly of both. [Here's it](https://compiler-explorer.com/z/zeGdn9K48) The only difference is that C++20 version has a branch to deal with `X = 0` as `__builtin_clz(0)` is undefined....

@adamant-pwn sorry for the delay, the C++20 solution using `std::bit_width` will handle case of 0 so it'll not have UB. I am not sure whether you want me to describe...

Don't you think it will derail the article of sparse table? Going into deep on how to compute log? Maybe we should simply remove log array and just use log2_floor()...

okay cool, i added benchmark and non-C++20 solution

Urggh, you're right. I pushed the wrong link. Here's the right one: [https://quick-bench.com/q/Zghbdj_TEkmw4XG2nqOpD3tsJ8U](https://quick-bench.com/q/Zghbdj_TEkmw4XG2nqOpD3tsJ8U) yeah in the benchmark the pre-computation time is excluded because its outside of the benchmarking loop.

If somebody needs a quickfix, paste these lines before `\makeatother` at the very end: ``` \newenvironment{cvsubsectioncenter}[2][1]{ \notblank{#2}{\toggletrue{centertitledefined}}{} \ifboolexpr{togl {centertitledefined}}{ \begin{center} \textbf{#2} \linebreak \end{center} % Add space according to the specidied...