article thumbnail

Faster remainders when the divisor is a constant: beating compilers and libdivide

Daniel Lemire

The division by a power of two ( / (2 N )) can be implemented as a right shift if we are working with unsigned integers, which compiles to single instruction: that is possible because the underlying hardware uses a base 2. We also published our benchmarks for research purposes. I make my benchmarking code available.

C++ 279
article thumbnail

The Return of the Frame Pointers

Brendan Gregg

2005-2023: The winter of broken profilers However, the change was then applied to x86-64 (64-bit) as well, which had sixteen registers and didn't benefit so much from a seventeenth. and we may have been flying close to the edge of hardware cache warmth, where adding a bit more instructions caused a big drop.

Java 145
article thumbnail

SQL Server I/O Basics Chapter #2

SQL Server According to Bob

As ​​ the ​​ administrator of a SQL Server 2005 installation, ​​ you will find that ​​ visibility into ​​ the ​​ SQL Server ​​ I/O ​​ subsystem ​​ has been ​​ significantly increased.

Servers 40