CanadaHonk / porffor

A from-scratch experimental AOT JS engine, written in JS
https://porffor.dev
MIT License
2.75k stars 62 forks source link

Optimize double not (`!!`) #21

Closed CanadaHonk closed 6 months ago

CanadaHonk commented 6 months ago

Search reference: // todo/perf: optimize !! (compiler/codegen.js)

Instead of generating 2 falsy checks for each !, just use 1 truthy instead (also use forceTruthyMode = 'full').

tekknolagi commented 6 months ago

Wahoo!