<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/src, branch scratch/timsort</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Fix over-zealous assertions</title>
<updated>2022-03-17T14:08:24+00:00</updated>
<author>
<name>Mattias Engdegård</name>
</author>
<published>2022-03-17T14:08:24+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=43a339fe10df3952a5f1749403d7b8148554008a'/>
<id>43a339fe10df3952a5f1749403d7b8148554008a</id>
<content type='text'>
* src/sort.c (gallop_left, gallop_right): Don't test Lisp values for
being nonzero; it only made sense when `key` was a pointer that had to
be non-null.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/sort.c (gallop_left, gallop_right): Don't test Lisp values for
being nonzero; it only made sense when `key` was a pointer that had to
be non-null.
</pre>
</div>
</content>
</entry>
<entry>
<title>; Fix mistake in last commit (use of wrong variable)</title>
<updated>2022-03-17T10:27:59+00:00</updated>
<author>
<name>Mattias Engdegård</name>
</author>
<published>2022-03-17T10:27:59+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=63c1f0d58d846095eac1bde726e0c72856a9deec'/>
<id>63c1f0d58d846095eac1bde726e0c72856a9deec</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Resolve sort predicate ahead of time</title>
<updated>2022-03-17T09:35:57+00:00</updated>
<author>
<name>Mattias Engdegård</name>
</author>
<published>2022-03-16T16:33:07+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=72a313d3922d109a4351a4dec15e903b2a70d0a3'/>
<id>72a313d3922d109a4351a4dec15e903b2a70d0a3</id>
<content type='text'>
* src/sort.c (tim_sort): If the sort predicate is a symbol, find the
corresponding function before starting the sort.  This is especially
beneficial if the predicate was an alias (`string&lt;`, for example).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/sort.c (tim_sort): If the sort predicate is a symbol, find the
corresponding function before starting the sort.  This is especially
beneficial if the predicate was an alias (`string&lt;`, for example).
</pre>
</div>
</content>
</entry>
<entry>
<title>; Minor improvements to timsort</title>
<updated>2022-03-16T14:14:24+00:00</updated>
<author>
<name>Andrew G Cohen</name>
</author>
<published>2022-03-16T14:06:49+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=9edfa27f9604f197ce47d86dc9ec07f14bfb7dde'/>
<id>9edfa27f9604f197ce47d86dc9ec07f14bfb7dde</id>
<content type='text'>
* src/fns.c (sort_list, sort_vector): Improve documentation and
variable names.
(merge): Replace function inorder with direct use of call2.
* src/lisp.h: Remove inorder prototype.
* src/sort.c:
(struct reloc): Document the order field.
(inorder): Uppercase INLINE.
(binarysort): Move type declaration.
(needmem): New INLINE function.
(merge_lo, merge_hi): Use it.
(merge_getmem): Remove unnecessary if.
(tim_sort): Remove unnecessary if.
(reverse_vector): Shift instead of integer divide by 2.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/fns.c (sort_list, sort_vector): Improve documentation and
variable names.
(merge): Replace function inorder with direct use of call2.
* src/lisp.h: Remove inorder prototype.
* src/sort.c:
(struct reloc): Document the order field.
(inorder): Uppercase INLINE.
(binarysort): Move type declaration.
(needmem): New INLINE function.
(merge_lo, merge_hi): Use it.
(merge_getmem): Remove unnecessary if.
(tim_sort): Remove unnecessary if.
(reverse_vector): Shift instead of integer divide by 2.
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace list and vector sorting with TIMSORT algorithm</title>
<updated>2022-03-11T05:31:32+00:00</updated>
<author>
<name>Andrew G Cohen</name>
</author>
<published>2022-03-10T01:30:00+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=e0470bcec76b94f93aed796abdcab14e2086fffc'/>
<id>e0470bcec76b94f93aed796abdcab14e2086fffc</id>
<content type='text'>
* src/Makefile.in (base_obj): Add sort.o.
* src/deps.mk (fns.o): Add sort.c.
* src/lisp.h: Add prototypes for inorder, tim_sort.
* src/sort.c: New file providing tim_sort.
* src/fns.c:  Remove prototypes for removed routines.
(merge_vectors, sort_vector_inplace, sort_vector_copy): Remove.
(sort_list, sort_vector): Use tim_sort.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/Makefile.in (base_obj): Add sort.o.
* src/deps.mk (fns.o): Add sort.c.
* src/lisp.h: Add prototypes for inorder, tim_sort.
* src/sort.c: New file providing tim_sort.
* src/fns.c:  Remove prototypes for removed routines.
(merge_vectors, sort_vector_inplace, sort_vector_copy): Remove.
(sort_list, sort_vector): Use tim_sort.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add optional GC marking function to specpdl unwind_ptr record</title>
<updated>2022-03-05T10:31:32+00:00</updated>
<author>
<name>Mattias Engdegård</name>
</author>
<published>2022-03-05T10:12:54+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=daf46703ce83cc652667e89aa50161a36e9a8575'/>
<id>daf46703ce83cc652667e89aa50161a36e9a8575</id>
<content type='text'>
Add a new `record_unwind_protect_ptr_mark` function for use with C data
structures that use the specpdl for clean-up but also contain possibly
unique references to Lisp objects.

* src/eval.c (record_unwind_protect_ptr_mark): New.
(record_unwind_protect_module, set_unwind_protect_ptr):
Set the mark function to NULL.
(mark_specpdl): Call the mark function if present.
* src/lisp.h (unwind_ptr): Add a mark function pointer to the
SPECPDL_UNWIND_PTR case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new `record_unwind_protect_ptr_mark` function for use with C data
structures that use the specpdl for clean-up but also contain possibly
unique references to Lisp objects.

* src/eval.c (record_unwind_protect_ptr_mark): New.
(record_unwind_protect_module, set_unwind_protect_ptr):
Set the mark function to NULL.
(mark_specpdl): Call the mark function if present.
* src/lisp.h (unwind_ptr): Add a mark function pointer to the
SPECPDL_UNWIND_PTR case.
</pre>
</div>
</content>
</entry>
<entry>
<title>Garbage Haiku tooltip frames on size change</title>
<updated>2022-03-05T06:24:09+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2022-03-05T06:23:30+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=8969953328a6cb5b7f131c2b7441e9d5d21191aa'/>
<id>8969953328a6cb5b7f131c2b7441e9d5d21191aa</id>
<content type='text'>
* haikuterm.c (haiku_read_socket): If tooltip frame dimensions
actually changed, garbage the frame.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* haikuterm.c (haiku_read_socket): If tooltip frame dimensions
actually changed, garbage the frame.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix process-attributes time precision on BSD</title>
<updated>2022-03-05T03:29:06+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2022-03-05T03:21:38+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=2f5a8c4f275eeb36f575c312adb9a17bd8168994'/>
<id>2f5a8c4f275eeb36f575c312adb9a17bd8168994</id>
<content type='text'>
* src/sysdep.c (timeval_to_timespec) [__FreeBSD__ || DARWIN_OS]:
Remove; no longer needed.
(make_lisp_s_us) [__FreeBSD__ || DARWIN_OS || __OpenBSD__]:
New function.
(make_lisp_timeval) [__FreeBSD__ || DARWIN_OS || __OpenBSD__]:
Rework in terms of make_lisp_s_us.
(system_process_attributes) [__FreeBSD__ || DARWIN_OS ||
__OpenBSD__]: Simplify by using the above.  This fixes some minor
problems where timestamps promised more precision than was
actually available.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/sysdep.c (timeval_to_timespec) [__FreeBSD__ || DARWIN_OS]:
Remove; no longer needed.
(make_lisp_s_us) [__FreeBSD__ || DARWIN_OS || __OpenBSD__]:
New function.
(make_lisp_timeval) [__FreeBSD__ || DARWIN_OS || __OpenBSD__]:
Rework in terms of make_lisp_s_us.
(system_process_attributes) [__FreeBSD__ || DARWIN_OS ||
__OpenBSD__]: Simplify by using the above.  This fixes some minor
problems where timestamps promised more precision than was
actually available.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix process-attributes time precision on GNU/Linux</title>
<updated>2022-03-05T03:29:05+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2022-03-05T03:21:38+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=2fbd48f733426824cb89b958378a52cfb053774c'/>
<id>2fbd48f733426824cb89b958378a52cfb053774c</id>
<content type='text'>
* src/sysdep.c [GNU_LINUX]:
(time_from_jiffies): Simplify by using time-convert.  Change args
and result type.  All uses changed.
(ltime_from_jiffies): Remove; call time_from_jiffies instead.
(put_jiffies): New function.
(get_up_time): Return Lisp_Object not struct timespec.
All uses changed.  Simplify by using time-add.
(system_process_attributes): Simplify by using the above.
This fixes some minor problems where timestamps promised more
precision than was actually available.  When info is not
available (e.g., sysconf fails) do not place it into the alist.
* src/timefns.c (float_time): Now extern.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/sysdep.c [GNU_LINUX]:
(time_from_jiffies): Simplify by using time-convert.  Change args
and result type.  All uses changed.
(ltime_from_jiffies): Remove; call time_from_jiffies instead.
(put_jiffies): New function.
(get_up_time): Return Lisp_Object not struct timespec.
All uses changed.  Simplify by using time-add.
(system_process_attributes): Simplify by using the above.
This fixes some minor problems where timestamps promised more
precision than was actually available.  When info is not
available (e.g., sysconf fails) do not place it into the alist.
* src/timefns.c (float_time): Now extern.
</pre>
</div>
</content>
</entry>
<entry>
<title>%CPU can exceed 100 on GNU/Linux</title>
<updated>2022-03-05T03:29:05+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2022-03-05T03:21:38+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=b19ec1be3c35b0ec231282ab51d0b320e2967052'/>
<id>b19ec1be3c35b0ec231282ab51d0b320e2967052</id>
<content type='text'>
* src/sysdep.c (system_process_attributes) [GNU_LINUX]:
CPU usage can exceed 100% on a multicore platform when Emacs is
not entirely single-threaded.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/sysdep.c (system_process_attributes) [GNU_LINUX]:
CPU usage can exceed 100% on a multicore platform when Emacs is
not entirely single-threaded.
</pre>
</div>
</content>
</entry>
</feed>
