Recent submissions

Comment · 3 years ago
Comment · 9 years ago
One way I've found to isolate this is to turn off turbo boost and underclock the cpu, while making sure the avx offset is set to 100%. While you would never want to run a production system like this, it does help to eliminate any issues with cpu throttling. If the avx-512 version of the program still runs slower then something else is interfering besides cpu throttling.
Comment · 9 years ago
There are many high schools like this in the U.S. that are state funded, both in very liberal and very conservative states.
Comment · 11 years ago
Recompiling without fastmath gives the same answer as the article "3.1415926545880506".

  mac >> clang++ -O3 -march=native main.cpp
  mac >> ./a.out
  3.1415926545880506
  total time taken is: 4.3861569999999999s
Twice as slow as the fastmath version but still faster than the go version.
Comment · 11 years ago
Great article on the complexities of investigating performance issues! Another very interesting surprise is when I run this locally on my macbook, clang is much faster

  mac >> go run main.go
  approximating pi with 1000000000 iterations.
  3.1415926545880506
  total time taken is: 9.706911232s

  mac >> clang++ -O3 -ffast-math -march=native main.cpp
  mac >> ./a.out
  3.1415926545864963
  total time taken is: 2.14196s
Comment · 11 years ago
One caveat of perfect hash functions, including CMPH, is that for a very large amount of keys the data structs they use internally become very large. In the case of CMPH when I tried with around 30 million keys the result was several MBs which caused it to not fit in L3 cache. For large dictionaries, hash functions like xxhash and farmhash are usually a better option than the perfect hash functions.
Comment · 13 years ago
Comment · 13 years ago
Comment · 13 years ago
Meh, I knew the days of tax free internet purchases would end some day.
Comment · 14 years ago
Looks great, but the price is exorbitantly high for a large number of users :(

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton