News for hackers. Stuff that matters.
Re:Emacs-ng: Emacs with Deno runtime and TypeScript by vitus on Tuesday March 16, 2021 @05:53PM (#26483593)
I think this is what you're looking for.

    time emacs --script fib-0b03fe9a-6b386e71.eln    
    emacs --script fib-0b03fe9a-6b386e71.eln  22.47s user 0.09s system 99% cpu 22.664 total
About 50% faster, which is nothing to sneeze at, but still appreciably slower than most other things I tried.

(I copied the .eln from the cache to confirm that's what I'm running against; I got a similar speedup from running against fib.elc.)

Re:Emacs-ng: Emacs with Deno runtime and TypeScript by koral on Wednesday March 17, 2021 @12:09PM (#26493125)
Asking as wasn't mention, was fib compiled with comp-speed 3?

That should be considerably relevant in this benchmark.

PS you can also run a wider set of benchmarks to compare against stock Emacs using:

https://elpa.gnu.org/packages/elisp-benchmarks.html

Here some not very updated results:

http://akrl.sdf.org/gccemacs.html#org4297f0f

Re:Emacs-ng: Emacs with Deno runtime and TypeScript by hvis on Thursday March 18, 2021 @05:58PM (#26507997)
Hi Andrea (right?),

IIUC, you're saying the fib benchmark gets optimized out at speed 3 (and thus run faster than all the implementations discussed here).

But what about speed 2, which is the current default? If we're 15 times slower on this benchmark, does that mean that Node has much cheaper function calls, or something like that?

Because we have to keep Emacs Lisp functions advice-able (which I agree is a good thing)?

Re:Emacs-ng: Emacs with Deno runtime and TypeScript by koral on Friday March 19, 2021 @05:02AM (#26511302)
IMO benchmarking is a way broader topic.

Specifically a single fibonacci example is not a good performance indicator by any means.

For instance let's assume V8 is faster in average at running this kind of nanobenchmarks (probably at least for now it is), but how much does it cost to convert non trivial data structures from Lisp to JS and back in a real case?

I expect there will be a lot of back and forward if the system if JS and Lisp get mixed and have to cooperate.

How much does it cost to go through foreign functions calls?

This are just initial thoughts that are not accounted at all here.

And even benchmarking nano-benchmarks can be surprisingly tricky ;) :) https://github.com/emacs-ng/emacs-ng/issues/187#issuecomment...

Re:Emacs-ng: Emacs with Deno runtime and TypeScript by hvis on Friday March 19, 2021 @04:05PM (#26517667)
Sure.

My questions here are about whether these results indicate further optimization potential for native-comp (in the default configuration, hopefully).

emacs-ng is an interesting experiment, but I think I will only be able to seriously consider it if it comes to reimplementing the Elisp VM on top of V8. Then it will be a single runtime, and little to no data structure conversion and FFI will be required.

In the meantime, I'll keep following the native-comp progress ;), as well as dreaming of Web Workers in stock Elisp API.

Re:Emacs-ng: Emacs with Deno runtime and TypeScript by hvis on Tuesday March 16, 2021 @08:07PM (#26484925)
Thank you. That's an interesting result.