Work in progress: 181,232 of 181,233 sites checked so far, more every week · updated 2 Nov 2026Missing a blog? Tell us

Top all-time · #2332

S

strchr.com updates

Personal blog · strchr.com · on HN as abareplaceprogrammingsystems

strchr.com updates is a personal blog at strchr.com about programming and systems. Since 2009, 33 different Hacker News readers have linked it 44 times, most often “Hash functions: An empirical comparison (2008)”. The last post was in 2019, but the archive is still widely read.

Visit the blog
44mentions?
33HN people?
2009–2024first – last linked?
Links on Hacker News per year · peak 7 in 2010

Too few sampled comments (23) to say how often HN recommends it.?

Why HN links it

HN readers link strchr.com for technical posts on hash function benchmarks, x86 machine code and instruction statistics, and SSE string instructions, and cite its pages as evidence.

Summarised by Claude from a sample of 23 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.

The author on HN?

abareplace · 24 karma · member since 2022

Search and replace in multiple files with regular expressions: https://www.abareplace.com Blog: https://www.strchr.com

From their public HN profile, which links to this site.

Most-linked posts?

  1. Hash functions: An empirical comparison (2008)
    8 people · 8 mentions · first linked 2016-07-24
  2. Hash functions: An empirical comparison (2008)
    5 people · 5 mentions · first linked 2010-09-09
  3. /strcmp_and_strlen_using_sse_4.2
    4 people · 4 mentions · first linked 2010-10-13
  4. Implementing strcmp, strlen, and strstr using SSE 4.2 instructions (2008)
    3 people · 3 mentions · first linked 2016-09-01
  5. x86 Machine Code Statistics (2008)
    2 people · 3 mentions · first linked 2017-06-15
  6. Redundancy of x86 Machine Code (2009)
    2 people · 2 mentions · first linked 2018-01-24
  7. Programming books and sites
    2 people · 2 mentions · first linked 2011-11-15

What Hacker News says?

  1. Writing an expression parser is probably the compiler "equivalent": http://www.strchr.com/expression_evaluator

    Comment linking /expression_evaluator

    on “Kernel 101 – Let’s write a Kernel”
  2. Submitted Implementing strcmp, strlen, and strstr using SSE 4.2 instructions (2008) as a story · 101 points

    HN discussion
  3. > LLVM's libc++ Great find! So the library solutions are still often suboptimal, and it's even more easy to hide bad decisions in the C++ sources, so whoever has the approach "just use the default library" should be aware of that once the performance is important. Yes, even the simple multiplicative constants can significantly improve the hash if it by default doesn't do anything with the input! The libraries defini…

    Comment linking /hash_functions

    on “Fibonacci Hashing: The Optimization That the World Forgot”
  4. Submitted X86 Machine Code Statistics as a story · 60 points

    HN discussion
  5. I tried to compile such list in past, see http://www.strchr.com/links

    Comment linking /links

    on “List of freely available programming books”
  6. Submitted Hash functions: An empirical comparison (2008) as a story · 48 points

    HN discussion
  7. It's possible that the difference is in the actual code: x86 machine code sometimes has multiple different encodings for the same assembler instruction. These would show up as single-byte differences in the binary. See http://www.strchr.com/machine_code_redundancy for some examples. Compilers might use this to stenographically hide additional data in the binary. Printer manufacturers already do something similar ( h…

    Comment linking /machine_code_redundancy

    on “How I compiled TrueCrypt 7.1a for Win32 and matched the official binaries”
  8. Submitted Redundancy of x86 Machine Code (2009) as a story · 46 points

    HN discussion
  9. More tests: http://www.strchr.com/hash_functions

    Comment linking /hash_functions

    on “Which hashing algorithm is best for uniqueness and speed?”
  10. Submitted Hash functions: An empirical comparison (2008) as a story · 34 points

    HN discussion
  11. Yes, speed for normal inputs is what's generally desired. A faster hash function can yield better overall performance than having fewer collisions. Here's some empirical evidence for this: https://www.strchr.com/hash_functions The speed is correlated only weakly with the number of collisions-- and using the modern x86 CRC32 instruction yields the best results.

    Comment linking /hash_functions

    on “How we broke PHP, hacked Pornhub and earned $20k”
  12. Submitted A complex data structure for predictive text input in Firefox OS as a story · 5 points

    HN discussion
  13. > MurmurHash3 wasn't _designed_ with low collision rates in mind There is a difference between "low collision rate" and "collision resistance". Real-world data often contain regular patterns that can cause "bad" hash functions to give very non-random output, e.g. numbers at fixed intervals, pointers all aligned to 4k boundaries, or long strings that differ only by a short suffix. For instance, early versions of Java…

    Comment linking /hash_functions

    on “God: Scalable in Memory Data Structure Server in Go”
  14. Submitted Programming books and sites as a story · 3 points

    HN discussion
  15. For short strings, it basically doesn't help. For longer strings, it's a bit faster, it depends how bad what you were doing before was. Straight string comparison is not a great application for this in part because it's to intel's advantage to make string compare loops work fast without it. But you can be sure it speeds some customer's serious workload up significantly. That said, it all depends. It's great for "fig…

    Comment linking /strcmp_and_strlen_using_sse_4.2

    on “How the JVM compares strings on x86”
  16. Submitted x86 Machine Code Statistics (2008) as a story · 2 points

    HN discussion
  17. I can't really answer that but your question reminded me of https://www.strchr.com/x86_machine_code_statistics Turns out that in practice a tiny number of instructions make up the vast majority of all used upcodes in a typical application (although it's not clear in this article how long the tail is, there could be hundreds of instruction in that "others" slice). My understanding is that there are many legacy instru…

    Comment linking /x86_machine_code_statistics

    on “Is the x86 Architecture Sustainable?”
  18. Submitted Implementing strcmp, strlen, and strstr using SSE 4.2 instructions as a story · 2 points

    HN discussion
  19. An implementation that uses image maps without scripts: http://www.strchr.com/share_buttons

    Comment linking /share_buttons

    on “Why to use Twitter, Facebook and Google Plus share links and not buttons”
  20. Submitted Hash functions: An empirical comparison as a story · 2 points

    HN discussion
  21. jnwatson · 2017-03-25Recommends
    A great resource for hash function performance: https://www.strchr.com/hash_functions It includes a bunch of more modern hash functions the author missed.

    Comment linking /hash_functions

    on “Brief Introduction To General Purpose Hash Functions”
  22. Submitted HTML5: new features and showcase examples as a story · 2 points

    HN discussion
  23. danluu knows much more about the subject matter than me. Meanwhile... If I take the main.cpp from http://www.strchr.com/media/crc32_popcnt.zip that he comparing and paste it into a new, default, VC2010 project. Then compile it as a Release build, then the mixed disassembly for the inner loop of POPCNT_HardwareSubbuN() looks like cnt += __popcnt(*(DWORD*)buf) + __popcnt(*(DWORD*)(buf + sizeof(DWORD) )) + __popcnt(*(D…

    Comment linking /media/crc32_popcnt.zip

    on “Hand-Coded Assembly Beats Intrinsics in Speed and Simplicity”
  24. Submitted Hash Functions: An Empirical Comparison as a story · 1 points

    HN discussion
  25. AFAIK CRCs are not the fastest "hashes" you can get. Some non-cryptographic hashes outperform crcs by a large factor and provide longer checksums and much better statistical properties. E.g. see this: * https://www.strchr.com/hash_functions * https://jpountz.github.io/lz4-java/1.2.0/xxhash-benchmark/

    Comment linking /hash_functions

    on “Go Find Duplicates: A fast and simple tool to find duplicate files”
  26. Submitted Calculating day of week and Easter date as a story · 1 points

    HN discussion
  27. Good homework is to implement an x86-64 mod/rm encoder. Quite a few corner cases. Sometimes you'll need to up-convert input parameters, because some combinations can't use 8-bit offset, for example, but require a 32-bit value. RSP can't use scaling, etc. There's also plenty of redundancy: https://www.strchr.com/machine_code_redundancy

    Comment linking /machine_code_redundancy

    on “X86 Addressing Under the Hood”
  28. Submitted Hash functions: An empirical comparison as a story · 1 points

    HN discussion
  29. chromaton · 2013-08-26Recommends
    I found a clear explanation of the SIMD instructions here: http://www.strchr.com/strcmp_and_strlen_using_sse_4.2 . Apparently the instructions operate on strings up to 16 bytes in length.

    Comment linking /strcmp_and_strlen_using_sse_4.2

    on “Rejit - prototype of a non-backtracking, just-in-time, SIMD-able regexp compiler”
  30. Submitted Why there are no serious WP7 apps as a story · 1 points

    HN discussion

Search all of HN for strchr.com

Linked by the same people?