Top posts

Every blog post that took off on Hacker News, ranked by the votes of its best submission. 21,822 posts.

Software Engineering
Any year
6096

PHP 7's new hashtable implementation

About three years ago I wrote an article analyzing the memory usage of arrays in PHP 5. As part of the work on the upcoming PHP 7, large parts of the Zend Engine have been rewritten with a focus on smaller data structures requiring fewer allocations. In this article I will provide an overview of the new hashtable…

6103

Brilliant or insane code?

I came upon a very interesting and cryptic snippet of code somewhere nameless , and I can’t decide if it is brilliant or completely insane. It is a very obscure way of accomplishing the required task, but it’s around four times faster than the alternatives I’ve tried, so I have to admit that it’s not completely…

6105

This code smells of desperation

A few weeks ago I had the questionable pleasure of diving into the math exception handler of WIN87EM.DLL, the Windows 3.1 math emulator and FPU support library. Actually WIN87EM.DLL appears to have been first shipped with Windows 3.0, and the version in Windows 3.1 is more or less identical. The version shipped with…

6107

Building friend catchers

As a 13 year old, my dad’s advice on internet presence was: “Everything you post will be used against you in the future. So you should never associate your name with anything on the internet”. As a rebellious teenager my view was the opposite: “Everything you post on the internet will get lost. You should associate…

6117

Better Compression with Zstandard

I think I first heard about the Zstandard compression algorithm at a Mercurial developer sprint in 2015. At one end of a large table a few people were uttering expletives out of sheer excitement. At developer gatherings, that's the universal signal for something is awesome . Long story short, a Facebook engineer…