Live data from Hacker News

Prepack helps make JavaScript code more efficient

prepack.io

81–90 of 233 posts

Re: Prepack helps make JavaScript code more efficient

#81
post #79

I hate to bring this up whenever I see a Facebook project, but it still warrants saying: the patents clause in this project, like in others including React, is too broad. I really wish they made a "version 3" that limited the scope of the revocation to patents pertaining to the software in question, e.g. Prepack, React, rather than a blanket statement that covers any patent assertion against Facebook. While I suppose…

IANAL, but most likely: nothing. Less likely: Facebook counter-sues you for patent infringement and (maybe?) has a slightly better case as long as you keep using it. Your lawyers tell your engineers to rewrite everything without Facebook technologies and it's all a big pain in the ass and you regret ever suing Facebook for patent infringement.

Re: Prepack helps make JavaScript code more efficient

#82
post #23

Earlier quoted context omitted.

From the guidelines: > Please resist commenting about being downvoted. It never does any good, and it makes boring reading. https://news.ycombinator.com/newsguidelines.html Disclaimer: I do not work at Facebook.

While I appreciate your vigilantism (given you aren't actually a moderator nor do you work at FB), the real elephant in the room is that HN really needs to a better solution for vote collusion. I am already familiar with the guidelines, and I usually follow this rule to a tee, but the optics here are damning. What I'd really like to see is this discussion steered back on topic. It was originally interesting and produ…

Baseless accusations of collusion and shillage aren't OK on Hacker News. We care a lot about vote quality and we're more than happy to take a look at specific cases if you have concerns, but please email us at hn@ycombinator.com so that the discussion here can continue.

Re: Prepack helps make JavaScript code more efficient

#85
post #80

What is the business model for a tool like this? Who has the resource to spend man/years of work while also create such a fantastic, simple yet comprehensive landing page?

It's by Facebook. They have 1.x billion users across their web and mobile products all of which run JavaScript. Tiny improvements in product performance equals big $$$. Easily justifies efforts like this. And the rest of us get to free-ride :-)

Re: Prepack helps make JavaScript code more efficient

#86

Hi, I am Nikolai Tillmann, a developer on the Prepack project. I am happy to answer any questions!

Can you prove that any of the optimizations in your docs aren't already done by V8? I agree with the other commenters in this thread-- V8 likely does these already. You have an extraordinary claim, which requires extraordinary proof.

V8, like all tiered JITs, doesn't do many optimizations unless the code to be optimized is hot. This is the right thing for V8 to do, because most code on the Web is cold and so it's better to just run the code rather than sitting there optimizing it. But it does mean that there are a lot of optimizations that would be profitable to perform in the aggregate that are nevertheless unprofitable to do at runtime, because the time spent to optimize outweighs the running time of the unoptimized code. AOT optimizers like Prepack can solve this dilemma, by doing expensive optimizations ahead of time so that doing them won't eat into the runtime of the program.

Re: Prepack helps make JavaScript code more efficient

#87
post #79

I hate to bring this up whenever I see a Facebook project, but it still warrants saying: the patents clause in this project, like in others including React, is too broad. I really wish they made a "version 3" that limited the scope of the revocation to patents pertaining to the software in question, e.g. Prepack, React, rather than a blanket statement that covers any patent assertion against Facebook. While I suppose…

This gets brought up every time, even after many times it's been clarified (even by lawyers) that it gives you more rights overall (as the downsides to it are true either way).

Remember - without that patent grant you have no rights to any of Facebook's patents anyhow. With it, you do.

So the worst case is that you'd be in the same situation if you didn't have the grant.

Re: Prepack helps make JavaScript code more efficient

#88
post #52

How does it compare to Google's closure compiler? It is considered by many best in class. It understands the code (uses Java based Rhino Javascript engine), while most alternatives (UglifyJS & co) just monkey patch things. You can trust the Google's closure compiler output. Edit: @jagthebeetle: have you tried "advanced mode"? (One should read the documentation before using it, it's really a game changer but requires…

Closure compiler optimizes code size, while this optimises code execution.

Re: Prepack helps make JavaScript code more efficient

#89
post #79

I hate to bring this up whenever I see a Facebook project, but it still warrants saying: the patents clause in this project, like in others including React, is too broad. I really wish they made a "version 3" that limited the scope of the revocation to patents pertaining to the software in question, e.g. Prepack, React, rather than a blanket statement that covers any patent assertion against Facebook. While I suppose…

This gets brought up every time, even after many times it's been clarified (even by lawyers) that it gives you more rights overall (as the downsides to it are true either way ). Remember - without that patent grant you have no rights to any of Facebook's patents anyhow . With it, you do. So the worst case is that you'd be in the same situation if you didn't have the grant.

Yes, I know; I mentioned that my understanding is that they're more beneficial. The beneficial aspects of the clause don't forgive the broadness of it, however.
Post reply on HN