News for hackers. Stuff that matters.
Re:Show HN: Adblock Fast by solox3 on Wednesday September 09, 2015 @12:33PM (#10192391)
The seven rules:

https://github.com/rocketshipapps/adblockfast/blob/master/op...

Are these regular expressions machine-compiled?

Re:Show HN: Adblock Fast by danso on Wednesday September 09, 2015 @12:40PM (#10192456)
Ha 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.
Re:Show HN: Adblock Fast by chrisseaton on Wednesday September 09, 2015 @01:01PM (#10192593)
So 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?
Re:Show HN: Adblock Fast by stygiansonic on Wednesday September 09, 2015 @01:09PM (#10192629)
This 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/

1. https://news.ycombinator.com/item?id=10192562

Re:Show HN: Adblock Fast by byoogle on Wednesday September 09, 2015 @12:34PM (#10192401)
Yes, they are.
Re:Show HN: Adblock Fast by wingerlang on Wednesday September 09, 2015 @12:44PM (#10192496)
Is a regex much faster than a simple list?