Dear Simon,
That's the kindest message I have ever received. Thank you so very much. Made my day and my life.
I am hoping, using 'native-compile', about which I have heard great things, to contribute one function that is the same as 'stable-sort' in Common Lisp. It runs, in SBCL, about twice as fast as SBCL's stable-sort. See the attached file n3ms.lisp. The really stunning news to me is that my friend Grant Passmore, running on an M3 machine only yesterday, and taking advantage of threads in SBCL, saw a 5x performance improvement over SBCL's stable-sort. I have not the slightest clue about whether threads are in Emacs or in its future.
The name of my function is 'msa'. I have attached the file msa.el in its current state of development. It is far from finished and no one in their right mind will try to use it! But great Emacs minds might read it and tell me things I need to know.
The threads code I added to 'msa' for SBCL is I think an amazing comment upon what a fantastic job the SBCL folks have done for threads. My addition to 'msa' to take advantage of threads is only about a dozen lines long, and in my extremely unhumble opinion, it is a dozen lines of the greatest beauty that I have ever seen. May the Lord bless John von Neumann, wherever he is, for 'merge-sort'.
But I do fear for the worst. I am 77 and have always worried too much, I also attach a file that I just sent to rms, because I cannot yet use m-x report-emacs-bug, due to some mailer problem. I run on a $100 Lenovo Chromebook, and somehow, by magic Emacs 28 just suddenly appeared a few days ago and it is great, except for 1. some mailer problem with report-emacs-bug and 2. crucial to my work on msa, the following bug report, in the attached file compile-bug.el, on native-compile.
I say I fear for the worst because if that bug is what I think it is, it would kill 'msa' performance.
Very secondarily, even if the bug is fixed, I have no idea how I could ever take advantage of it!
Emacs 28 appeared by magic on my Chromebook only a few days ago. I have always depended upon the kindness of friends and strangers, who have magically installed Emacs for me. All I did to install Emacs on my Chromebook was to run this command:
sudo apt-get install emacs
Great minds, I guess you guys with Emacs, at Google, and at Debian should know that is all I know and all I need to know, so far, about installing Emacs.
Thanks so very, very much for your extremely kind letter,
Bob
P. S. You mention 'random'. My bet is that unless you fix the bug that I mention above, no one could ever do a random via native-compiler that would be competitive. Using declared fixnum and vectors is crucial to any speed-competitive work on 'random' that I can imagine.
P. P. S. My home phone is 512 467 0182. Phone me any time. You or anyone else doing Emacs development. If you like, since I can call anywhere in the USA for free, I will hang up and call you right back if you prefer.
P. P. P. S. You kindly mentioned the ancient 'boyer' benchmark. One must know about it that it has a bug, as far as truth rather than performance testing, is concerned. Whoever translated that file from Maclisp to Common Lisp failed to note that 'member' now needs a :test 'equal bit in the call.
Common Lisp defaults the test to 'eql, and that is not what one needs. Anyway, that code is only for performance testing. Nqthm and ACL2 are real theorem-proving programs written in Common Lisp and they are both easy to obtain for 'free', or for 'gratis', as rms is now saying. To some I guess,
'free' may sometimes have a bad connotation; not for me, though. May the Free Software Foundation forever flourish. What Harvard has done for us all: Gates, Zuckerberg, Stallman.