= strlen = == Variants == ||= '''Name''' =||= '''Description''' =|| || stock || MI C version || || SSE2 || {{{pcmpeqb}}} and {{{pmovmskb}}} || || SSE4.2 || {{{pcmpestri}}} and {{{pcpmestrm}}} || || AVX || 128-bit {{{vpcmpeqb}}} and {{{vpmovmskb}}} || || ERMS || {{{repne scasb}}} for machines with ERMS || '''Note:''' clang was too smart and optimized plain {{{strlen}}} calls away, so I had to create a copy of the C version called {{{strlen_mi()}}} to fool it. == Machines Tested == ||= '''CPU''' =||= '''Speed (GHz)''' =||= '''Notes''' || || Xeon X5365 || 3.00 || 2 x 4 Supermicro X7DBU || || Xeon X5482 || 3.20 || 2 x 4 Supermicro X7DWN+ || || Xeon X5675 || 3.07 || Westmere 2 x 6 Supermicro X8DTU || || Core i5-2520M || 2.50 || Sandy Bridge 1 x 4 Thinkpad X220 (4286) || || Xeon E5-2680 || 2.70 || Romley 2 x 8 Supermicro X9DRW || || Xeon E5-2667 v2 || 3.30 || Romley V2 2 x 8 Supermicro X9DRW || == Test Cases == ||= '''Name''' =||= '''Description''' =|| || page || aligned string one page - 1 long || || short || aligned string 14 characters long || || short2 || aligned string 32 characters long || || short3 || aligned string 48 characters long || || offset || 4 byte offset string 126 characters long || || offset2 || 7 byte offset string 95 characters long || == Results == The numbers are the min value in the distribution where the values are a TSC delta across a single invocation of the test. {{{#!th rowspan=3 '''CPU''' }}} {{{#!th colspan=30 '''Test / Variant''' }}} |-- {{{#!th colspan=5 '''page''' }}} {{{#!th colspan=5 '''short''' }}} {{{#!th colspan=5 '''short2''' }}} {{{#!th colspan=5 '''short3''' }}} {{{#!th colspan=5 '''offset''' }}} {{{#!th colspan=5 '''offset2''' }}} |-- || '''stock''' || '''SSE2''' || '''SSSE4.2''' || '''AVX''' || '''ERMS''' || \ || '''stock''' || '''SSE2''' || '''SSSE4.2''' || '''AVX''' || '''ERMS''' || \ || '''stock''' || '''SSE2''' || '''SSSE4.2''' || '''AVX''' || '''ERMS''' || \ || '''stock''' || '''SSE2''' || '''SSSE4.2''' || '''AVX''' || '''ERMS''' || \ || '''stock''' || '''SSE2''' || '''SSSE4.2''' || '''AVX''' || '''ERMS''' || \ || '''stock''' || '''SSE2''' || '''SSSE4.2''' || '''AVX''' || '''ERMS''' || || Xeon X5365 || \ || 1386|| '''[[span(864, style=color: green)]]'''|| -- || -- || [[span(16506, style=color:red)]]|| \ || 81|| '''[[span(72, style=color: green)]]'''|| -- || -- || [[span(180, style=color:red)]]|| \ || 90|| '''[[span(72, style=color: green)]]'''|| -- || -- || [[span(252, style=color:red)]]|| \ || 90|| '''[[span(81, style=color: green)]]'''|| -- || -- || [[span(315, style=color:red)]]|| \ || 144|| '''[[span(108, style=color: green)]]'''|| -- || -- || [[span(630, style=color:red)]]|| \ || 135|| '''[[span(108, style=color: green)]]'''|| -- || -- || [[span(504, style=color:red)]]|| || Xeon X5482 || \ || 1608|| '''[[span(808, style=color: green)]]'''|| -- || -- || [[span(16464, style=color:red)]]|| \ || 48|| '''[[span(40, style=color: green)]]'''|| -- || -- || [[span(136, style=color:red)]]|| \ || 48|| '''[[span(40, style=color: green)]]'''|| -- || -- || [[span(140, style=color:red)]]|| \ || 56|| '''[[span(40, style=color: green)]]'''|| -- || -- || [[span(264, style=color:red)]]|| \ || '''80'''|| '''80'''|| -- || -- || [[span(592, style=color:red)]]|| \ || '''72'''|| '''72'''|| -- || -- || [[span(464, style=color:red)]]|| || Xeon X5675 || \ || 1592|| [[span(848, style=color: green)]]|| [[span(2100, style=color:red)]]|| -- || [[span(8252, style=color:red)]]|| \ || 60|| [[span(24, style=color: green)]]|| [[span(24, style=color: green)]]|| -- || [[span(92, style=color:red)]]|| \ || 32|| [[span(46, style=color:red)]]|| 32|| -- || [[span(124, style=color:red)]]|| \ || 78|| [[span(46, style=color: green)]]|| [[span(83, style=color:red)]]|| -- || [[span(156, style=color:red)]]|| \ || 76|| [[span(64, style=color: green)]]|| [[span(104, style=color:red)]]|| -- || [[span(316, style=color:red)]]|| \ || 64|| [[span(56, style=color: green)]]|| [[span(88, style=color:red)]]|| -- || [[span(256, style=color:red)]]|| || Core i5-2520M || \ || 3525|| 1950|| 6463|| 536|| 25812|| \ || 100|| 75|| 75|| 18|| 300|| \ || 112|| 75|| 87|| 18|| 412|| \ || 112|| 75|| 112|| 21|| 512|| \ || 212|| 100|| 262|| 21|| 1012|| \ || 175|| 100|| 212|| 24|| 825 || || Xeon E5-2680 || \ || 1496|| 632|| 2048|| 644|| 8260|| \ || 36|| 24|| 24|| 28|| 96|| \ || 40|| 24|| 28|| 24|| 132|| \ || 52|| 24|| 32|| 24|| 164|| \ || 80|| 40|| 84|| 24|| 324|| \ || 68|| 36|| 64|| 24|| 264|| || Xeon E5-2667 v2 || \ || 1296|| 632|| 2076|| 648|| 8260|| \ || 24|| 24|| 24|| 24|| 100|| \ || 36|| 24|| 28|| 24|| 132|| \ || 48|| 24|| 28|| 28|| 164|| \ || 80|| 44|| 84|| 24|| 324|| \ || 64|| 28|| 64|| 24|| 264||