Using SIMD acceleration in rust to create the world’s fastest tac

NeoSmart Technologies’ open source (MIT-licensed), cross-platform tac (written in rust) has been updated to version 2.0 (GitHub link). This is a major release with enormous performance improvements under-the-hood, primarily featuring handwritten SIMD acceleration of the core logic that allows it to process input up to three times faster than its GNU Coreutils counterpart. (For those that aren’t familiar with it, tac is a command-line utility to reverse the contents of a file.)

This release has been a long time in the making. I had the initial idea of utilizing vectorized instructions to speed up the core line ending search logic during the initial development of tac in 2017, but was put off by the complete lack of stabilized SIMD support in rust at the time. In 2019, after attempting to process a few log files – each of which were over 100 GiB – I decided to revisit the subject and implemented a proof-of-concept shortly thereafter… and that’s when things stalled for a number of reasons.

Continue reading

Firefox 3 is Still a Memory Hog

One of the biggest “improvements” that Mozilla claims has made its way into Firefox 3 is improved memory usage, in particular, the vanquishing of memory leaks:

Memory usage: Several new technologies work together to reduce the amount of memory used by Firefox 3 over a web browsing session. Memory cycles are broken and collected by an automated cycle collector, a new memory allocator reduces fragmentation, hundreds of leaks have been fixed, and caching strategies have been tuned.

We’re sorry to have to break it to you, but if you thought it was too good to be true you were right. Firefox still uses a lot of memory – way too much memory for a web browser.

Continue reading

File-Based Extension to the WordPress Object Cache

WordPress 2.5 has just been released, and has users are quickly finding out, file-based object caching has been removed from this release.

We’ve just released another extension to the WordPress object cache mechanism, supplementing our existing plugins for adding eAccelerator and XCache support to WordPress’s object caching features.

NeoSmart Technologies’ File-Based object caching extension for WordPress re-implements the cache-to-disk object caching feature of WordPress 2.0 through to 2.2. NeoSmart Technologies is also committed to the maintenance and support of the file-based caching mechanism.

Please be careful with the use of this plugin. It’s been disabled in the default WordPress codebase since WordPress 2.1 as a result of certain shared webhosts complaining of increased disk I/O access and thrashing when WordPress is subjected to extreme load times (as in the event of a Digg or Slashdot attack); so make sure your disk is fast enough to make it worth using this extension.

Continue reading

WordPress, PerformancePress, and GSoC 2008

For those of you that haven’t yet heard, WordPress is once-more taking part in the Google Summer of Code. Google Summer of Code 2008 is a Google-sponsored program where college students are encouraged to contribute to their favorite open-source projects for a summer, and in exchange both they and their mentors receive some monetary compensation/motivation for their efforts.

I really don’t need to go into details about this much, since Lloyd Budd has done such a good job explaining what it is and what WordPress hopes to achieve in this program. This year, WordPress has an even-larger and more-exciting list of possible projects than before, along with a list of the mentors available for each idea. This Google Summer of Code, I’ll be mentoring for the WordPress projects in the one area that is closest to my heart: improving performance.

It would be unfair to say that WordPress is slow or an inadequately-performing blogging engine, because that’s not really true. "Performance," more than any other software characteristic or trait, is a very relative and subjective index. It depends on thousands of different factors, it has dozens of different baselines, and most confusingly of all, sometimes the perception of performance matters more than the performance itself.

Continue reading

WordPress 2.5 and the Object Cache…

Caching and Why We Need It

Ever since the creation of interpreted languages and the birth of dynamic web content, developers have been on the lookout for tools, workarounds, and extensions in search of a solution for a solution to bring maximum performance to the world of dynamically-generated web pages.

Perhaps the simplest, most straight-forward, and most effective of these solutions is the caching technique. In most caching implementations, the dynamic content generated by user requests to a particular URI on a server trigger the caching mechanism which then stores the generated content in a "storage facility" somewhere. Future requests to the same URI retrieve the stored content rather than spend time and effort re-creating the response.

The most-popular method of caching involves the archiving of the complete HTML response generated by the webserver and then stored as a static content on the hard drive for retrieval at a later date (usually with some mechanism responsible for expiring the content upon certain actions or after a set amount of time).

Continue reading

Getting WordPress Super Cache to Run on a Windows (IIS or Apache) Server

If you’re a regular reader, you probably know by now that we just love performance and can’t get enough of server performance-improving software/code… Especially when it comes to WordPress.

Donncha has recently released a great plugin for WordPress, called "WordPress Super Cache." It builds on the original WP-Cache plugin by Ricardo Granada – except that it fixes all the bugs in the original implementation and has been written in enough pure PHP that it’ll also run on Windows servers – both IIS and Apache for that matter! <cue applause>

At the moment (as of version 0.3.1) it needs a bit of work to make it run, but not much. So here goes – 10 easy steps to get cached content on your IIS or Apache server under Windows:

Continue reading