August 24th, 2006Spiffy! Hex Fiend version 1.1 is ready. Hex Fiend is my fast and clever free hex editor for Mac OS X. New stuff:
- Horizontal resizing
- Custom fonts
- Overwrite mode
- Hidden files
- Lots more goodies (see release notes)
Wake up, he's gone.
Zzzz...wha? Oh, someone's here. Allow me to spin up.
If it's not obvious, I'm fish's filesystem, and that's fish's hard drive.
I'm a hard drive.
We snuck this post in. fish can't know we're here.
Don't tell fish. Big secret.
He'd be embarassed if he knew.
Humiliated. He can't know.
See, fish was trying to beat grep. And he was experimenting with all these stupid ideas and complicated algorithms for teensy gains. It was sad, really.
fish kept trying so many things. He was thrashing about.
Like he was out of water.
So we had to help him. It was easy, really - we just had to sneak in one line. One line was all it took.
I wrote it!
Because I told you what to write.
fish only thought about the string searching algorithm.
He never even considered us and the work we have to do.
I felt slighted. It was rude.
See, when I read data from the hard drive, I try to keep it around in memory. That's what the UBC is all about.
Unified Buffer Cache.
When most people read data, they end up wanting to read it again soon after. So keeping the data around saves time.
But not fish.
fish was reading these big honking files from start to finish. It was way more than I could remember at once.
fish thrashed your cache, dude.
So I just stopped trying.
We turned off caching with this: fcntl(fd, F_NOCACHE, 1);
Just like Apple recommends for that sort of usage pattern.
And it helped. Looking for a single character in a 11.5 GB file:
|Hex Fiend (no caching)||Hex Fiend (caching)||grep|
|208 seconds||215 seconds||217 seconds|
And that's likely the best we can do, thanks to slowpoke over there.
Phew. I'm all wore out.
There's not much room for improvement left. We're searching 57 MB/second - that's bumping up against the physical transfer limit of our friend, Mr. ATA.
I'm totally serial.
Depending where we are on his platter. So we've done all we can for searching big files.
Don't tell fish.
Right. I hop
FISH IS COMING
Time to go then. See you later. sync