[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] support for accessing CPU/core count (processor-count)

From: Omar Polo
Subject: Re: [PATCH] support for accessing CPU/core count (processor-count)
Date: Sun, 10 Oct 2021 20:17:49 +0200
User-agent: mu4e 1.6.6; emacs 28.0.50

Arthur Miller <arthur.miller@live.com> writes:

> [...]
> And that is the beauty of having it as a Lisp function. You can just tweak it,
> don't need to recompile entire Emacs :).

I know I'm getting off-topic, but I just don't understand your point.  I
don't see how spawning a bunch of commands, checking their return code
and parsing their output is better than a couple of lines of C that do
the right thing depending on the platform (decided at compile time!) and
get directly an int.

I love lisp, don't get me wrong, and I actually prefer writing elisp
rather than following the GNU C coding style (I love C too but GNU style
hurts my eyes.)

Sure, checking the number of cpus is not something that is done a lot,
and I can't imagine a situation where it would be a bottleneck, but on
the other hand, for the same argument, it's not something that needs to
be tweaked often, so the "recompile emacs" argument doesn't apply
really.  Better still, as Stefan suggested, we could reuse the glib
function which is better than the OP patch and the function in native

reply via email to

[Prev in Thread] Current Thread [Next in Thread]