[Github-comments] [geany/geany] Enable local variables for C/C++ and improve autocompletion (PR #3185)

elextr notifications at github.com
Mon May 2 22:59:50 UTC 2022


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.  

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 :smile:

There are regularly comments about string comparisons being "slow" (in lots of issues/PRs and not just Geany, not picking on @techee comment above) but modern compilers require `-fno-builtin` to _stop_ 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.

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.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3185#issuecomment-1115447292
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3185/c1115447292 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220502/7e11c286/attachment-0001.htm>


More information about the Github-comments mailing list