Ex-Mozilla CEO Brendan Eich’s security- and privacy-focused browser, Brave, is now far more efficient at blocking ads. The developers dropped C++ and implemented a new engine in Mozilla’s own programming language, Rust, which resulted in a 69x improvement for rule handling.
Taking inspiration from uBlock Origin and Ghostery, Brave’s ad-blocker now claims the following benefits:
- The new algorithm with optimised set of rules is 69x faster on average than the current engine.
- For the popular filter list combination of EasyList and EasyPrivacy it achieves class-leading performance of spending only 5.7μs on average per request.
- An additional benefit of having the blocker built into the core of the browser is even less work duplicating what the browser already does, e.g. for URL parsing. With this information already available, our browser-focused API provides still better performance, cutting average request processing time down to 4.6μs.
- The new engine already supports more of the filter rule syntax that has evolved beyond the original specification, which will allow us to handle web compatibility issues better and faster.
The development is an interesting contrast to the recent controversy surrounding Google’s browser. Chrome’s developers will reportedly enact API changes that could reduce the effectiveness of ad blockers dramatically.