3 ms·
The seven rules: https://github.com/rocketshipapps/adblockfast/blob/master/opera/chrome/scripts/blocking.js https://github.com/rocketshipapps/adblockfast/blob/
by solox3 11y ago
The seven rules:
https://github.com/rocketshipapps/adblockfast/blob/master/opera/chrome/scripts/blocking.js https://github.com/rocketshipapps/adblockfast/blob/master/op...
Are these regular expressions machine-compiled?
- byoogle 11y agoYes, they are.
- wingerlang 11y agoIs a regex much faster than a simple list?
- danso 11y agoHa ha, I came just to post exactly this. This seems like a cool product, and kudos to the OP for releasing it freely and as open software...but I'm considerably less inclined to trust software that uses such misleading copy. The fact that it is the very first benchmark listed is also not promising and makes me reflexively doubt the other benchmarks.
- chrisseaton 11y agoSo what if they aren't? I haven't read the expressions in depth but they look like on a quick glance like they could be checked in linear time. It may have a high degree of branching, but so what when you are checking a single linear path through it for each URL?
- stygiansonic 11y agoThis is correct. According to this article[0], posted in another comment[1], iOS 9's content blocker regular expressions are limited to a subset of regex for which matching can be done in linear time: "Extremely powerful, regular expressions can surprisingly be done in linear time if you use a strict set of regular expression characters through Thompson’s NFA algorithm. Safari’s Content Blocker implementation in fact imposes this strict regular expression limitation ..." 0. http://blog.appgrounds.com/content-blockers-beat-adblocking/ http://blog.appgrounds.com/content-blockers-beat-adblocking/ 1. https://news.ycombinator.com/item?id=10192562 https://news.ycombinator.com/item?id=10192562