unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Should wide-int be registered in features?
@ 2018-04-05 22:12 Rocky Bernstein
  2018-04-05 22:21 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Rocky Bernstein @ 2018-04-05 22:12 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1153 bytes --]

.. or in system-configuration. And/or shown in emacs-version?

Recently I was reading the thread "Floating-point constant folding in Emacs
byte compiler", and it looks like, as of now, most (or all) of the issues
raised have been resolved in the byte-code optimizer.

Although I'm happy that things are fixed now, there a part of me that asks:
what might have help detection and prevention of such a problem?

I think there should be a simple program to do some sanity checking of
bytecode *before* it gets run to warn of potential problems or worse does
partial execution work and then crashes.

I've mentioned this in the past, but I now realize that I can write such a
lint checker in Elisp Lisp as a side package.

But there are a couple additional features that might be helpful, both in
such a bytecode lint program and independent of that: whether emacs was
built with --with-wide-int.

My understanding of the floating-point-constant bug is that the behavior is
different between optimizaition on builds that differ using this option.

Other things like x-toolkit, gtk, multi-tty, are listed in features. Should
wide-int be something like this?

[-- Attachment #2: Type: text/html, Size: 2501 bytes --]

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

* Re: Should wide-int be registered in features?
  2018-04-05 22:12 Should wide-int be registered in features? Rocky Bernstein
@ 2018-04-05 22:21 ` Stefan Monnier
  2018-04-05 22:34   ` rocky
  2018-04-06  6:28 ` Andreas Schwab
  2018-04-06  6:30 ` Ulrich Mueller
  2 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2018-04-05 22:21 UTC (permalink / raw)
  To: emacs-devel

> But there are a couple additional features that might be helpful, both in
> such a bytecode lint program and independent of that: whether emacs was
> built with --with-wide-int.

I don't see why that would be relevant: --with-wide-int should give
pretty much the same result as building on a 64bit system.


        Stefan




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

* Re: Should wide-int be registered in features?
  2018-04-05 22:21 ` Stefan Monnier
@ 2018-04-05 22:34   ` rocky
  2018-04-05 22:41     ` Noam Postavsky
  2018-04-06  0:56     ` Stefan Monnier
  0 siblings, 2 replies; 8+ messages in thread
From: rocky @ 2018-04-05 22:34 UTC (permalink / raw)
  To: Emacs-devel

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

Stefan Monnier wrote
>> But there are a couple additional features that might be helpful, both
>> in> such a bytecode lint program and independent of that: whether emacs
>> was> built with --with-wide-int.I don't see why that would be relevant:
>> --with-wide-int should givepretty much the same result as building on a
>> 64bit system.        Stefan

"should" is not the same thing as "does". If I have this correct knowing
this and knowing how the bytecode was created would have been helpful. Are
there more bugs of this nature where setting the option has a differening
behavior? Also, I believe there are performance differences and differences
in capabilities. e.g --with-wide-int adds: 
>  buffer and string size up to 2GB on 32-bit hosts, at the cost of 10% to
> 30% slowdown of Lisp

and how inside of Emacs is one supposed to know if this is in effect? 



--
Sent from: http://emacs.1067599.n8.nabble.com/Emacs-Dev-f108916.html

[-- Attachment #2: Type: text/html, Size: 1494 bytes --]

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

* Re: Should wide-int be registered in features?
  2018-04-05 22:34   ` rocky
@ 2018-04-05 22:41     ` Noam Postavsky
  2018-04-05 22:46       ` rocky
  2018-04-06  0:56     ` Stefan Monnier
  1 sibling, 1 reply; 8+ messages in thread
From: Noam Postavsky @ 2018-04-05 22:41 UTC (permalink / raw)
  To: rocky; +Cc: Emacs developers

On 5 April 2018 at 18:34, rocky <rocky@gnu.org> wrote:

> and how inside of Emacs is one supposed to know if this is in effect?

You can check `system-configuration-options'.



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

* Re: Should wide-int be registered in features?
  2018-04-05 22:41     ` Noam Postavsky
@ 2018-04-05 22:46       ` rocky
  0 siblings, 0 replies; 8+ messages in thread
From: rocky @ 2018-04-05 22:46 UTC (permalink / raw)
  To: Emacs-devel

Thanks - that answers my question/concern. 



--
Sent from: http://emacs.1067599.n8.nabble.com/Emacs-Dev-f108916.html



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

* Re: Should wide-int be registered in features?
  2018-04-05 22:34   ` rocky
  2018-04-05 22:41     ` Noam Postavsky
@ 2018-04-06  0:56     ` Stefan Monnier
  1 sibling, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2018-04-06  0:56 UTC (permalink / raw)
  To: emacs-devel

> "should" is not the same thing as "does". If I have this correct knowing
> this and knowing how the bytecode was created would have been helpful.

You seem to refer to a known case where you think this would have been
useful, but I don't know what that case is.  AFAIK the recent
discussions were mostly concerned about whether Emacs's integers were
30bit or 62bit, which you can readily test by looking at
most-positive-fixnum or by checking something like (zerop (expt 2 40)).

> Also, I believe there are performance differences and differences
> in capabilities. e.g --with-wide-int adds: 
>>  buffer and string size up to 2GB on 32-bit hosts, at the cost of 10% to
>> 30% slowdown of Lisp
> and how inside of Emacs is one supposed to know if this is in effect? 

Why/when would Elisp need to know?  The same slowdown could occur
because of load on the machine.  Similar object size limits could come
from the OS rather than from the way Emacs was compiled.




        Stefan




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

* Re: Should wide-int be registered in features?
  2018-04-05 22:12 Should wide-int be registered in features? Rocky Bernstein
  2018-04-05 22:21 ` Stefan Monnier
@ 2018-04-06  6:28 ` Andreas Schwab
  2018-04-06  6:30 ` Ulrich Mueller
  2 siblings, 0 replies; 8+ messages in thread
From: Andreas Schwab @ 2018-04-06  6:28 UTC (permalink / raw)
  To: Rocky Bernstein; +Cc: emacs-devel

On Apr 05 2018, Rocky Bernstein <rb@dustyfeet.com> wrote:

> But there are a couple additional features that might be helpful, both in
> such a bytecode lint program and independent of that: whether emacs was
> built with --with-wide-int.

You have that already: most-positive-fixnum.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



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

* Re: Should wide-int be registered in features?
  2018-04-05 22:12 Should wide-int be registered in features? Rocky Bernstein
  2018-04-05 22:21 ` Stefan Monnier
  2018-04-06  6:28 ` Andreas Schwab
@ 2018-04-06  6:30 ` Ulrich Mueller
  2 siblings, 0 replies; 8+ messages in thread
From: Ulrich Mueller @ 2018-04-06  6:30 UTC (permalink / raw)
  To: Rocky Bernstein; +Cc: emacs-devel

>>>>> On Thu, 5 Apr 2018, Rocky Bernstein wrote:

> .. or in system-configuration. And/or shown in emacs-version?

It is already registered if it is passed as a configure option:

   system-configuration-options is a variable defined in ‘emacs.c’.
   Its value is
   "[...] --without-wide-int [...]"



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

end of thread, other threads:[~2018-04-06  6:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-05 22:12 Should wide-int be registered in features? Rocky Bernstein
2018-04-05 22:21 ` Stefan Monnier
2018-04-05 22:34   ` rocky
2018-04-05 22:41     ` Noam Postavsky
2018-04-05 22:46       ` rocky
2018-04-06  0:56     ` Stefan Monnier
2018-04-06  6:28 ` Andreas Schwab
2018-04-06  6:30 ` Ulrich Mueller

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).