armoha / euddraft

System for pluginizing eudplib codes.
Other
29 stars 4 forks source link

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

Open armoha opened 1 year ago

armoha commented 1 year ago
    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