<p></p>
<p dir="auto">With regard to performance, I suggest that unless someone can provide a real world usage that demonstrates poor performance that we leave it as is and see how it goes.</p>
<p dir="auto">Reasoning about performance with modern chips with multi-level caches, and optimising compilers is questionable to say the least, all the old rules of thumb are wrong, they were the first thing optimised away <g-emoji class="g-emoji" alias="smile" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f604.png">😄</g-emoji></p>
<p dir="auto">There are regularly comments about string comparisons being "slow" (in lots of issues/PRs and not just Geany, not picking on <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/techee/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/techee">@techee</a> comment above) but modern compilers require <code class="notranslate">-fno-builtin</code> to <em>stop</em> them emitting hardware optimised instructions that the chip maker developed to handle C's null terminated strings, utilising the caches, and interleaved memory channels, and prefetches etc.  That old rule of thumb is pretty untrue these days and especially when the strings are likely to be less than a cache line long, like symbols are, they likely take one memory access and the actual comparison is hidden.</p>
<p dir="auto">So unless an implementation has gross performance problems (like time is exponential in size) then unless we have an actual usage thats a problem, or benchmarks, then use the simplest to write and maintain implementation first.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/3185#issuecomment-1115447292">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ2TBCRC6KBUWX53MULVIBM6NANCNFSM5UWGU33A">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAIOWJY5KW2FKAE2KFQEP2DVIBM6NA5CNFSM5UWGU33KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIJ6F77A.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><geany/geany/pull/3185/c1115447292</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/3185#issuecomment-1115447292",
"url": "https://github.com/geany/geany/pull/3185#issuecomment-1115447292",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>