]> granicus.if.org Git - graphviz/commit
remove micro-optimizations in HTML lexer
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 26 Dec 2020 01:16:16 +0000 (17:16 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 23 Jan 2021 21:25:14 +0000 (13:25 -0800)
commitdc8fb86ec186f563647c6fd8aa05c05ca9bab0b8
treebabdbd14e6e8b22257f2774235738f2b3ce881cb
parent2de1cb8ea295cb1f2ef0ac46d7e7bb7954e01b69
remove micro-optimizations in HTML lexer

This code was attempting to avoid an expensive call to strcasecmp when the first
byte already indicates a mismatch. Modern compilers can perform this
optimization themselves, including inlining strcasecmp and unrolling and
vectorizing its loop. Manually comparing the first byte actually impedes the
compiler because it's harder for it to see your intent. Related to #1913.
lib/common/htmllex.c