Live data from Hacker News

Brave Improves Its Ad-Blocker Performance with New Engine in Rust

brave.com

71–80 of 382 posts

Re: Brave Improves Its Ad-Blocker Performance with New Engine in Rust

#71

> was already implemented in heavily optimized C++ handling requests with sub-millisecond overhead, we found that we can further optimise it for a 69x average improvement Seems like an unnecessary optimization, though I'm sure it was fun. I wrote one a little while back in C++ also[0]. It's not documented the best, but uses a kind of custom tree to match. 0 - https://github.com/cretz/doogie/blob/master/src/blocker_ru…

They're presumably gaining the other non-performance advantages of Rust over C++ (i.e. the borrow checker etc.) though, so safer and faster is a win. As you say though, they seem to focus on performance but that might just be the audience they see themselves talking to.

Re: Brave Improves Its Ad-Blocker Performance with New Engine in Rust

#72

Earlier quoted context omitted.

Conversely, the language semantics make some more aggressive optimizations possible by the compiler, without the programmer having to drop hints.

Why is this necessarily true? All Rust gives you is safety -- no data races and better memory safety. But since data races and use-after-free are undefined behavior in C++ anyway, C++ compilers can still aggressively optimize by assuming those two don't happen. It's true that some compilers disable optimizations on certain undefined behavior to prevent unintuitive behavior ( https://blog.regehr.org/archives/140 ) but…

Rust also gives you strong guarantees around lack of aliasing.

Brendan Eich remains a homophobe who abuses his financial power to oppress people he doesn't like.

Re: Brave Improves Its Ad-Blocker Performance with New Engine in Rust

#73
post #39

Earlier quoted context omitted.

What’s wrong with Firefox?

Too freaking slow.

Have you tried it recently? It has gotten a lot faster, so much so that some people say it's faster than Chrome in many cases.

Personally, I find it more than adequate, and I agree with their mission a lot more than the other browser vendors.

Re: Brave Improves Its Ad-Blocker Performance with New Engine in Rust

#74

I think Brave has the ability to save the web, it has a great model of blocking ads by default, at a lower level than the extensions do so it is much faster. I think Opera had/has this too.

Sure, Brave can block ads, but isn't the browser exploring injecting its own advertisements?

Re: Brave Improves Its Ad-Blocker Performance with New Engine in Rust

#75

Earlier quoted context omitted.

Conversely, the language semantics make some more aggressive optimizations possible by the compiler, without the programmer having to drop hints.

Why is this necessarily true? All Rust gives you is safety -- no data races and better memory safety. But since data races and use-after-free are undefined behavior in C++ anyway, C++ compilers can still aggressively optimize by assuming those two don't happen. It's true that some compilers disable optimizations on certain undefined behavior to prevent unintuitive behavior ( https://blog.regehr.org/archives/140 ) but…

For one, in typical code, the Rust compiler can make more aggressive optimizations because every `&mut` is guaranteed not to alias. The C++ equivalent, from the optimizer's standpoint, is `T * restrict`, which is rarely used (and harder to use correctly) by comparison.

Re: Brave Improves Its Ad-Blocker Performance with New Engine in Rust

#77

I'm impressed with Brave. I've started using it as my primary browser (after a couple false starts a year or so ago) and it has all the best of Chrome without the worst. There is controversy about how Brave does stuff, and I agree there is some sketchy stuff they are doing (replacing ads with their own). I'm glad they are giving us a choice, though, and exploring different options for sites being able to makes some m…

> and it has all the best of Chrome without the worst

I mean, what is the "worst" stuff it doesn't have? Account sign in?

It seems like there are plenty of other Chromium embedders to get that without the sketchy stuff.

Re: Brave Improves Its Ad-Blocker Performance with New Engine in Rust

#78

I'm impressed with Brave. I've started using it as my primary browser (after a couple false starts a year or so ago) and it has all the best of Chrome without the worst. There is controversy about how Brave does stuff, and I agree there is some sketchy stuff they are doing (replacing ads with their own). I'm glad they are giving us a choice, though, and exploring different options for sites being able to makes some m…

literally a copy paste of a comment from few months ago....

Re: Brave Improves Its Ad-Blocker Performance with New Engine in Rust

#80
post #18

Earlier quoted context omitted.

It's potentially even worse than that. Exploiting this grey area in the law will lead to a response from the courts and lawmakers. That response might well require that browsers display pages exactly as the publisher intends. In other words, the end of ad blockers and other tools, thanks to Brave. (Not at all unlikely given that Google seems to want that too.)

It feels to me like this could be legislated based on profiting on others' copyright. The issue here is one party making money, without consent of any form, based on another party's published materials.

The web server freely provides that content, it's not like the browser is stealing it. If they really want to protect their content, they can put it behind a paywall.

It shouldn't be illegal to not request certain parts of a site, and it shouldn't be illegal to choose not to render parts of a page. What should be illegal is taking credit for copyrighted material, and that's not what going on.

Post reply on HN