Forum Discussion
LoveNoodles
Altocumulus
Feb 02, 2019equals vs eq?
Hi, is there any documentation or articles out there that suggest using "equals" is more efficient than using "eq" in string comparisons in irules?
Dave_McCauley_3
Cirrostratus
Feb 02, 2019You could run a test with two irules using each and checking the timing in the "tmsh show ltm rule" command. Hit each irule with apache bench 100k times and see what the timing looks like.
I would venture a guess that since they're both string comparison operators, they probably use the same code under the hood. "==" should be less efficient for strings since it has to deal with integers as well. Unless the iRule devs found some giant inefficiency within the TCL eq operator (Unlikely), it's probably just to make a more readable iRule.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects