structKeyExists vs. isDefined
In some local documentation I found at work, I ran across this note from a previous developer:
Prefer structKeyExists() to isDefined(). isDefined() is slow and will present problems in certain cases.
I found a couple web sites, particularly isDefined() vs structKeyExists(), where people explain that structKeyExists() should be faster than isDefined(), because it only checks a specific scope (e.g. form, session, url), whereas isDefined() checks all possible scopes.
Personally, I think isDefined() is much more readable and think the readability might be worth a microsecond or 3. I'm wondering if the developers here have an opinion on the matter. Is isDefined() really so slow and inefficient that it will cause problems?
Prefer structKeyExists() to isDefined(). isDefined() is slow and will present problems in certain cases.
I found a couple web sites, particularly isDefined() vs structKeyExists(), where people explain that structKeyExists() should be faster than isDefined(), because it only checks a specific scope (e.g. form, session, url), whereas isDefined() checks all possible scopes.
Personally, I think isDefined() is much more readable and think the readability might be worth a microsecond or 3. I'm wondering if the developers here have an opinion on the matter. Is isDefined() really so slow and inefficient that it will cause problems?
