aboutsummaryrefslogtreecommitdiffstats
path: root/java/org
diff options
context:
space:
mode:
authorStefan Kangas2025-02-28 18:28:58 +0100
committerStefan Kangas2025-02-28 18:32:28 +0100
commit8b659313b83c82cfe09af1638289fccdfc9af23d (patch)
treeffe568825f16999e921c93920a2b5d7de8db1148 /java/org
parent92a8d24e4948dd9e7fa8bdbadac48f9eed19fa49 (diff)
downloademacs-8b659313b83c82cfe09af1638289fccdfc9af23d.tar.gz
emacs-8b659313b83c82cfe09af1638289fccdfc9af23d.zip
Lift widget functions from C to Lisp
In the mid-1990s, these functions were moved from Lisp to C to "improve performance". However, Moore's Law, and perhaps other improvements too, has made this rationale irrelevant. On this machine, with --native-compilation=no, I observed only a slight ~4% performance difference. For example, displaying a buffer full of widgets (e.g., 'M-x customize RET browse-url RET') takes 4ms here, meaning the performance gap is under 0.1ms. Even on less powerful machines, this difference would remain imperceptible. Given this, let's lift these functions back to to Lisp, which offers the usual benefits. We already have solid test coverage, but let's add a more focused test for 'widget-get' and 'widget-put' to be thorough. * lisp/wid-edit.el (widget-put, widget-get, widget-apply): Move to Lisp from... * src/fns.c (Fwidget_put, Fwidget_get, Fwidget_apply): ...here. (syms_of_fns): Remove defsubrs for the above functions. * test/lisp/wid-edit-tests.el (widget-test-editable-field-widget-get/put): New test.
Diffstat (limited to 'java/org')
0 files changed, 0 insertions, 0 deletions