You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These two are equivalent, as -1 means "to the end of the string". Avoiding the count call is however slightly more efficient, and should be preferred if performance is a concern.
As @srenatus found some time back, the caching of numbers in OPA doesn't work as it was expected. Perhaps this issue would be less relevant if it did, and if that'll be the case later, we won't have to do this.
Coming back to this, I think it's too small to motivate a rule of its own. However, perhaps we could have a rule collect smaller optimizations within the scope of a single rule? Wouldn't necessarily all have to be about performance either, but cover any non-optimal use of built-ins like platform-dependent sprintf args, etc.
These two are equivalent, as
-1
means "to the end of the string". Avoiding thecount
call is however slightly more efficient, and should be preferred if performance is a concern.r1
r2
The text was updated successfully, but these errors were encountered: