Hi, I have read that using == to compare numbers rather than eq is more efficient and uses less CPU cycles and the same that eq should be used to compare text rather than ==. I have seen in an example code from a coder to overcome this issue, rather than use == to compare the numbers, the coder has placed the number in quotes and kept eq in use for the comparison, an example is as follows:
This was what was in the first instance:
if {($responseCode eq 403)}
This is what it was changed to so that it could overcome the issue highlighted:
if {($responseCode eq "403")}
In my opinion it should have been changed to the following so that now it would be efficient in less CPU cycles in the sense of how it has been referenced in my statement above.
if {($responseCode == 403)}
But does what the coder has done by placing the number in quotes actually done it correctly so that using the eq is now valid in the sense how eq should be used as referenced above? Or has it made no difference or made it worse in terms of CPU use?
This was what was in the first instance:
if {($responseCode eq 403)}
This is what it was changed to so that it could overcome the issue highlighted:
if {($responseCode eq "403")}
In my opinion it should have been changed to the following so that now it would be efficient in less CPU cycles in the sense of how it has been referenced in my statement above.
if {($responseCode == 403)}
But does what the coder has done by placing the number in quotes actually done it correctly so that using the eq is now valid in the sense how eq should be used as referenced above? Or has it made no difference or made it worse in terms of CPU use?