<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 28, 2020 at 9:56 AM Paul C. Anagnostopoulos via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">At what point should I consider changing from a StringSwitch construct to something more efficient? TableGen has a few of them. In particular, the switch for looking up a bang operator has about 40 cases, all short strings.<br>
<br>
One trivial improvement would be to split it into two StringSwitch's based on the first letter of the operator name.<br></blockquote><div><br></div><div>If that improves performance, then it sounds like a bug/area for improvement in StringSwitch itself, perhaps? </div></div></div>