writes: > On Fri, Aug 12, 2022 at 10:00:43PM +0600, Akib Azmain Turja wrote: > > [...] > >> It's hard for any compiled language to beat C code, and I believe it's >> *impossible* for any interpreted language to do that. And if it somehow >> does that, I would believe that the result is *hard-coded* in it. > > [...] > > I think this is too simplistic. There are known (small) cases where > (compiled) Common Lisp beats C code, or where LuaJit [1] does (don't > forget: a JIT knows things about your program a compiler can't). At > the other end of the scale (the very complex), where you end up > writing a whole garbage collector in your C app, it will be pretty > hard to beat one of the modern GCs you'll find in Schemes or > Javascripts. > > So the answer to this is most probably "it depends" :) > > Cheers > > [1] https://wingolog.org/archives/2014/09/02/high-performance-packet-filtering-with-pflua Yeah, it's possible for very optimized Brainfuck code to beat poor C code. Emacs has a native compiler, and AFAIK it's a ahead of time (AOT) compiler. If you really need a JIT, do performance-critical things in Guile Scheme and use results from Emacs. -- Akib Azmain Turja Find me on Mastodon at @akib@hostux.social. This message is signed by me with my GnuPG key. Its fingerprint is: 7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5