Serialization Format Performance

Posted Sun 31 January 2016 11:53 under category programming

Most of the work done in actual programming jobs is taking structured data in some particular format from one system, slightly tweaking it, and sending it off to some other system. When exchanging data between different processes, it's almost always necessary to serialize it into a series of bytes which can be sent across a dumb byte-oriented transport (such as TCP). There are hundreds upon hundreds of different serialization formats out there, but I just wanted to talk about a few of the most common that folks use with the Python programming language.

read more

Beating the Compiler

Posted Sat 28 February 2015 14:33 under category programming

We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.

— Donald Knuth

Measure. Don't tune for speed until you've measured, and even then don't unless one part of the code overwhelms the rest.

— Rob Pike

We spend a lot of our time in the modern, web services-driven technology industry ignoring performance issues. What's the point of micro-optimizing a 3ms function call when each request spends 8 or 9 seconds inside the SQLAlchemy ORM? Well, sometimes it's nice to practice those optimizion skills anyway, and today I'm going to walk you through micro-optimizing a simple problem and we'll see just how much better we can do than a naive solution... even though we probably normally shouldn't.

read more

wamupd-0.1.2

Posted Wed 21 April 2010 01:17 under category programming

wamupd 0.1.2 is now available at http://files.roguelazer.com/projects/wamupd/wamupd-0.1.2.tar.bz2 (or via git, if you prefer). It fixes some TXT-related bugs filed by @daagaak. As usual, to learn about the project you can visit the wamupd page.

read more

dnsextd, TCP, and IPv6

Posted Tue 02 March 2010 17:45 under category programming

Hello interested parties. dnsextd (in my git repository) now supports TCP. It was actually sort of an amusing bug. I guess the dnsextd code must date back to PowerPC, because it had an extra ntoh call which on little-endian systems would cause TCP requests to fail. It's fixed in the "tcp" branch of my git repository. In case you're curious as to how to get that repository, you would use the following:

% git clone http://files.roguelazer.com/projects/mDNSResponder-214.git
% cd mDNSResponder-214
% git branch --track tcp origin/tcp
% git checkout tcp

If you need more setup help ...

read more

wamupd-0.1.1

Posted Sat 20 February 2010 15:54 under category programming

So, some news on the wamupd front. I just released version 0.1.1 (tagged as such in git; also available as a tarball at http://files.roguelazer.com/projects/wamupd/wamupd-0.1.1.tar.bz2) which has a lot of new features over the prior, unnamed release.

  • wamupd now stays resident, renewing leases and such
  • It can talk to Avahi over D-BUS and pick up other services registered on the computer (sort of; it's kind of hack-ish)
  • Lots and lots and lots and lots of bug fixes

I've got ideas for the next few releases (still looking ...

read more