Nibblesort: Adventures in Optimization

A few months ago compiler researcher John Regehr held a low-level optimization contest for a silly problem: sort the nibbles in an arbitrary 64-bit number:

The problem is to sort the 4-bit pieces of a 64-bit word with (unsigned) smaller values towards the small end of the word. The nibble sort of 0xbadbeef is 0xfeedbba000000000. The function you implement will perform this sorting operation on a buffer of 1024 64-bit integers.

AlterConf SF/Oakland

A few weeks ago I attended AlterConf SF/Oakland, a conference focusing on diversity-related issues in the tech industry. The dozen or so talks were extremely varied both in topics and in style, but nearly all of them had a story.

I should note that I am a non-marginalized developer and a person with a lot of privilege, including being white, cis, and male. These are not my stories and not issues I have to struggle with on a day-to-day basis, and therefore my interpretation and commentary may have large holes or something dangerously wrong. Nevertheless, these are my impressions and opinions, and I both support every speaker being able to have a voice and agreed with nearly all of them.

“Skip the FFI”

I spoke again at last year’s LLVM Developers’ Meeting with my coworker John McCall. Our talk, “Skip the FFI: Embedding Clang for C Interoperability”, was about using the Clang compiler, in library form, to augment another language to work with C. This lets you present C declarations as if they were just special declarations in your own language rather than forcing your users to go through an external FFI. This is, of course, relevant to what I currently work on.

The video of the talk is now online, along with slides and of course all the other talks.

Older Posts

  1. 2012-12-08 How to Write a Checker in 24 Hours
  2. 2012-10-02 Git Tricks
  3. 2012-05-16 Big News
  4. 2012-04-26 Keyboard Adventures
  5. 2012-04-10 Mail Aliases
  6. 2011-08-14 Header Anchors: A Safari Extension
  7. 2011-08-10 "Little Big Details"
  8. 2011-07-29 Weak Linking
  9. 2011-07-25 Using Clang from SVN in Xcode
  10. 2011-07-22 rm vs. Time Machine
  11. 2011-07-14 Priorities
  12. 2011-06-30 Quick Look in TextMate
  13. 2011-06-27 git add
  14. 2011-06-20 Automatic Reference Counting
  15. 2011-06-16 Dealing with "Sandwich Code"
  16. 2011-06-05 gdba
  17. 2011-06-03 Chrome vs. Safari
  18. 2011-05-31 User-Side Troubleshooting
  19. 2011-05-30 Auspicious Continuation
  20. 2009-07-22 Scripting Bridge
  21. 2009-07-08 What Happened to Dockyard?
  22. 2009-06-26 Garbage Collectors and Stack Drawers
  23. 2009-06-21 Z shell
  24. 2009-05-22 “Several New Features”
  25. 2009-05-06 C++ Templates are Turing-Complete
  26. 2009-04-21 [Meme] How Many HTML Elements Can You Name in 5 Minutes?
  27. 2009-04-16 Safer Plugin Categories
  28. 2009-04-02 Hacking Safari 4...for Great Convenience
  29. 2009-03-27 Const Correctness
  30. 2009-03-19 Categories and +load
  31. 2009-03-15 Subversion Checksum Problems
  32. 2009-03-06 JavaScript Tetris
  33. 2008-09-04 Objective-J and Objective-C
  34. 2008-08-28 HTTPS and Name-based Virtual Hosting
  35. 2008-03-08 Alerts Without Apps (or nibs)
  36. 2008-01-14 NSNumber, CFNumber, and CFBoolean
  37. 2007-12-13 GenericToolbar and IB3
  38. 2007-10-27 Performance Optimization: Why We Can't Use valueForKeyPath:
  39. 2007-09-01 Short Xcode Tip: Plugins
  40. 2007-07-15 Port 25 Blocked?
  41. 2007-06-27 GenericToolbar Icon
  42. 2007-04-14 The Symbolism of Pretty URLS
  43. 2007-03-07 Flexible PHP
  44. 2007-01-12 Inauspicious Beginnings