euddraft icon indicating copy to clipboard operation
euddraft copied to clipboard

if (array[index]) is slower than if (array[index] > 0)

Open armoha opened this issue 2 years ago • 0 comments

    But new issue remains while moving optimizing pass from eudplib to epScript.
    In euddraft 0.9.7.4, `if (a[0])` will call subscript while `if (a[0] > 0)` does in-place comparison. :(

Originally posted by @armoha in https://github.com/armoha/euddraft/issues/83#issuecomment-1279997406

To put it accurately, both had been slow but latter got faster by https://github.com/armoha/eudplib/commit/94a1d6871d92d72977095482347fb2263a7d8e20

armoha avatar Oct 17 '22 07:10 armoha