Remove c
article thumbnail

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

Daniel Lemire

I believe that all optimizing C/C++ compilers know how to pull this trick and it is generally beneficial irrespective of the processor’s architecture. In concrete terms, here is the C code to compute the remainder of the division by some fixed divisor d : uint32_t d =. ; // your divisor > 0. Can we do better?

C++ 279
article thumbnail

Web Performance Bookshelf

Rigor

Steve Souders, plus Dion Almaer, Doug Crockford, Ben Galbraith, Tony Gentilcore, Dylan Schiemann, Stoyan Stefanov, Nicole Sullivan, Nicholas C. Information Architecture. In her book, Lara Hogan helps you approach projects with page speed in mind, showing you how to test and benchmark which design choices are most critical.

article thumbnail

Data Mining Problems in Retail

Highly Scalable

Besides that, the numbers can vary greatly depending on many factors, so our goal here is just to provide a few benchmarks that give some sense of the magnitude of potential improvements. Recall the basic equation for enterprise profit: where Q is quantity sold, P is price, V denotes variable costs, and C denotes fixed costs.

Retail 152