<div dir="ltr">Is that the full instruction "wait(r0)"? Wouldn't the "wait" be considered a mnemonic for the Mnemonic.empty() check in the match function which would send it through the binary search?</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 11, 2016 at 9:45 AM, Colin LeMahieu <span dir="ltr"><<a href="mailto:colinl@codeaurora.org" target="_blank">colinl@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">colinl added a comment.<br>
<br>
I hadn't run a benchmark before though I made a file with 1 million wait(r0) instructions, this is the last entry in the table so it should trigger the worst case.  The file amounts to 10mb and assembles to an object around 4mb.  For comparison I made an x86 file with 1 million "mov eax, cs" instructions.<br>
<br>
New parser:<br>
===========<br>
<br>
colinl@COLINL1 ~/llvm-master.ninja<br>
$ time ./bin/llvm-mc.exe -triple=hexagon-unknown-elf -filetype=obj huge.s -o huge.o<br>
<br>
real    0m6.627s<br>
user    0m0.000s<br>
<br>
sys     0m0.031s<br>
================<br>
<br>
Old parser:<br>
===========<br>
<br>
colinl@COLINL1 ~/BRANCH_7_2.ninja<br>
$ time ./bin/llvm-mc.exe -triple=hexagon-unknown-elf -filetype=obj ../llvm-master.ninja/huge.s -o huge.o<br>
<br>
real    0m8.421s<br>
user    0m0.016s<br>
<br>
sys     0m0.015s<br>
================<br>
<br>
X86 parser:<br>
===========<br>
<br>
colinl@COLINL1 ~/llvm-trunk.ninja<br>
$ time ./bin/llvm-mc.exe -triple=i386 -x86-asm-syntax=intel -filetype=obj -o huge.o huge.s<br>
<br>
real    0m1.989s<br>
user    0m0.015s<br>
<br>
sys     0m0.015s<br>
================<br>
<br>
The current parser exceeds the speed of our old parser and in the worst case the Hexagon parsing seems to be 3x slower than mnemonic lead targets which are all other targets.<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D14257" rel="noreferrer" target="_blank">http://reviews.llvm.org/D14257</a><br>
<br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">~Craig</div>
</div>