facebook/jcommon — pull request #14 by mwangw (2013-03-11 06:00:12+00:00)
Title: create fast path for StringDatum::asBoolean

Today, when a StringDatum is cast to a boolean it will always try to cast the value to a number with Byte.valueOf(). If the input is "true" or "false", an exception will be thrown and caught. This is inefficient if most of the input is "" or "true" or "false" (~790 times slower than a string compare in my test).

Since puma uses StringDatum.asBoolean() frequently in expression evaluation, this is to make a fast path for string values "", "true", and "false".