jquery/jquery — pull request #1513 by jakob-stoeck (2014-02-13 16:58:50+00:00)
Title: exit early of camelCase if no dash found

$.camelCase is used for $.css calls. Profiling those showed that for calls like `el.css('display', 'none')` 2% of work was done in the $.camelCase function.

The additional check for a dash adds negligible more computation but a performance boost for a lot of functions which use this. In Firefox 30 the proposed version is 3.5 times faster when no dashes are found and the same if something is found which might be nice for often-used CSS attributes like display and position.

http://jsperf.com/jquerycamelcase