unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#53482: Byte-code speedup [PATCH]
@ 2022-01-23 16:57 Mattias Engdegård
  2022-01-23 18:33 ` Lars Ingebrigtsen
  2022-01-23 22:20 ` Dmitry Gutov
  0 siblings, 2 replies; 7+ messages in thread
From: Mattias Engdegård @ 2022-01-23 16:57 UTC (permalink / raw)
  To: 53482

The branch scratch/bytecode-speedup now contains a set of related improvements to speed up the byte-code interpreter. If someone is allergic to Git, I could post them as separate patches.

Performance is improved in many ways but is mostly focussed on making Elisp's lamentably slow function calls faster, which should benefit a lot of code. Operations on fixnums have also been sped up, as well as some data structure access.

Equally importantly, the C stack requirements has shrunk meaning that users can recurse deeper before getting a segfault. For example, bytecode is no longer copied to a stack buffer for execution. I intend to carry this process further in a set of follow-up patches, but the current changes are definitely good enough on their own.

I have run a wide set of benchmarks; regressions are rare but obviously not all code benefits equally. Most code becomes at least a little faster.

Unless there are good arguments not to, I'll merge it to master shortly.






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#53482: Byte-code speedup [PATCH]
  2022-01-23 16:57 bug#53482: Byte-code speedup [PATCH] Mattias Engdegård
@ 2022-01-23 18:33 ` Lars Ingebrigtsen
  2022-01-23 21:27   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-01-23 22:20 ` Dmitry Gutov
  1 sibling, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-23 18:33 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: 53482, monnier

Mattias Engdegård <mattiase@acm.org> writes:

> The branch scratch/bytecode-speedup now contains a set of related
> improvements to speed up the byte-code interpreter. If someone is
> allergic to Git, I could post them as separate patches.

Perhaps Stefan M has some comments; added to the CCs.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#53482: Byte-code speedup [PATCH]
  2022-01-23 18:33 ` Lars Ingebrigtsen
@ 2022-01-23 21:27   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-01-23 21:30     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-01-23 21:27 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Mattias Engdegård, 53482

>> The branch scratch/bytecode-speedup now contains a set of related
>> improvements to speed up the byte-code interpreter. If someone is
>> allergic to Git, I could post them as separate patches.
> Perhaps Stefan M has some comments; added to the CCs.

I already sent him my comments on earlier (private) rounds ;-)
I like those patches.


        Stefan






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#53482: Byte-code speedup [PATCH]
  2022-01-23 21:27   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-01-23 21:30     ` Lars Ingebrigtsen
  2022-01-24 15:47       ` Mattias Engdegård
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-23 21:30 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Mattias Engdegård, 53482

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> The branch scratch/bytecode-speedup now contains a set of related
>>> improvements to speed up the byte-code interpreter. If someone is
>>> allergic to Git, I could post them as separate patches.
>> Perhaps Stefan M has some comments; added to the CCs.
>
> I already sent him my comments on earlier (private) rounds ;-)
> I like those patches.

Then please go ahead and merge, Mattias.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#53482: Byte-code speedup [PATCH]
  2022-01-23 16:57 bug#53482: Byte-code speedup [PATCH] Mattias Engdegård
  2022-01-23 18:33 ` Lars Ingebrigtsen
@ 2022-01-23 22:20 ` Dmitry Gutov
  2022-01-23 22:44   ` Dmitry Gutov
  1 sibling, 1 reply; 7+ messages in thread
From: Dmitry Gutov @ 2022-01-23 22:20 UTC (permalink / raw)
  To: Mattias Engdegård, 53482

On 23.01.2022 18:57, Mattias Engdegård wrote:
> I have run a wide set of benchmarks; regressions are rare but obviously not all code benefits equally. Most code becomes at least a little faster.

I'm seeing ~3% improvement in a js2-mode benchmark. Not revolutionary, 
but nothing to sneeze at.

Thanks, Mattias.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#53482: Byte-code speedup [PATCH]
  2022-01-23 22:20 ` Dmitry Gutov
@ 2022-01-23 22:44   ` Dmitry Gutov
  0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Gutov @ 2022-01-23 22:44 UTC (permalink / raw)
  To: Mattias Engdegård, 53482

On 24.01.2022 00:20, Dmitry Gutov wrote:
> I'm seeing ~3% improvement in a js2-mode benchmark.

And if I'm ensure the loaded code is byte-compiled, the difference comes 
up to ~13% (though the variance is high). Nice.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#53482: Byte-code speedup [PATCH]
  2022-01-23 21:30     ` Lars Ingebrigtsen
@ 2022-01-24 15:47       ` Mattias Engdegård
  0 siblings, 0 replies; 7+ messages in thread
From: Mattias Engdegård @ 2022-01-24 15:47 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Stefan Monnier, 53482-done

23 jan. 2022 kl. 22.30 skrev Lars Ingebrigtsen <larsi@gnus.org>:

> Then please go ahead and merge, Mattias.

Thank you, pushed to master.






^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-01-24 15:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-23 16:57 bug#53482: Byte-code speedup [PATCH] Mattias Engdegård
2022-01-23 18:33 ` Lars Ingebrigtsen
2022-01-23 21:27   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-23 21:30     ` Lars Ingebrigtsen
2022-01-24 15:47       ` Mattias Engdegård
2022-01-23 22:20 ` Dmitry Gutov
2022-01-23 22:44   ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).