Microoptimize various "is this string empty" checks
authorPeter Rabbitson <ribasushi@cpan.org>
Mon, 14 Dec 2015 09:18:17 +0000 (10:18 +0100)
committerPeter Rabbitson <ribasushi@cpan.org>
Fri, 22 Jan 2016 16:18:00 +0000 (17:18 +0100)
commitd52c4a75538bd15d1fa531a63c6ec45b8943dfd0
tree0af0b63bc38055901130e5039a37046bc0bc8714
parentbbf6a9a5d39cbf1c9d22cccd298ae95ac0fef694
Microoptimize various "is this string empty" checks

Checking the truthiness of the separately tracked string length is vastly
faster than doing actual string comparison

Working set identified via: grep -nPr "\b(ne|eq)\b\s*(\"\"|''|q{}|q())" lib
lib/DBIx/Class/ResultSet.pm
lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm
lib/DBIx/Class/Storage/DBIHacks.pm
lib/DBIx/Class/Storage/TxnScopeGuard.pm
lib/DBIx/Class/_Util.pm