News Score: Score the News, Sort the News, Rewrite the Headlines

Porffor: Type annotations for performance

My JS engine can now parse TS and use it for optimizations!My JS engine Porffor can now parse TypeScript, as I added pluggable parser support which includes Babel’s parser (which can parse TS). This itself isn’t that interesting, however I can now use those type annotations as compiler hints to optimize!Basic examplelet a = 1; if (a) { console.log(typeof a); } For the above JS, Porffor has to do several checks of the type of a:if (a) {If string, true if non-blank (not '')If undefined, false…If n...

Read more at goose.icu

© News Score  score the news, sort the news, rewrite the headlines