Author Archives: Josh

State of the hash functions, 2012

The state-of-the-art in non-cryptographic hash functions has advanced rapidly in the last few years. When I did some searching this week I was happy to see that new cutting-edge hash functions had been released even since last time I looked … Continue reading

Posted in Uncategorized | Leave a comment

Refcounting immutable cyclic graphs

Cycles are a thorn in the side of refcounting. But yesterday I discovered (or perhaps rediscovered) a simple, efficient scheme for refcounting cyclic graphs if the defs are immutable: find strongly-connected components and make all nodes in each SCC share … Continue reading

Posted in Uncategorized | 4 Comments

Making Knuth’s wish come true: the x32 ABI

Several years ago (though I can’t say exactly how many since it’s not dated) Knuth made the following complaint: A Flame About 64-bit Pointers It is absolutely idiotic to have 64-bit pointers when I compile a program that uses less … Continue reading

Posted in upb | Leave a comment

Beating the compiler

It’s been a while since I’ve posted about upb, but I’ve been busy improving it! I think the biggest achievement I can mention is that the core upb APIs (upb_handlers, upb_def, and upb_bytestream/upb_bytesink) are converging to the point where I’m … Continue reading

Posted in upb | Leave a comment

Using dtrace on OS X to debug a performance problem

I recently ported upb’s table-based decoder to use setjmp/longjmp-based error handling. I did this largely for code simplicity and readability, so that the non-error code-paths didn’t have to check for errors all the time. But unfortunately I noticed a dramatic … Continue reading

Posted in Uncategorized | Leave a comment