[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54572] int64 does not saturate correctly in n
From: |
Dan Sebald |
Subject: |
[Octave-bug-tracker] [bug #54572] int64 does not saturate correctly in negative direction |
Date: |
Fri, 31 Aug 2018 23:03:48 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0 |
Follow-up Comment #45, bug #54572 (project octave):
One last comment. I wondered if "goto" is something an optimizing compiler
will not remove and whether it retains an extra jump, e.g.,
https://stackoverflow.com/a/41609491
Given the current goto is rather short, it doesn't add too much extra code
space to apply the saturation code in all cases. The numbers are below, and
there seems to be no difference one way or another:
50 TRIALS
64-BIT SIGNED MULT
CURRENT_MULT CURRENT_NOGOTO_MULT D_FLOAT_MULT
tgood 14.580 14.792 14.340
tover 12.584 12.188 11.520
32-BIT SIGNED MULT
CURRENT_MULT CURRENT_NOGOTO_MULT D_FLOAT_MULT
tgood 7.4480 7.4520 7.4160
tover 5.8120 5.8160 5.9000
16-BIT SIGNED MULT
CURRENT_MULT CURRENT_NOGOTO_MULT D_FLOAT_MULT
tgood 4.3440 4.3440 4.4000
tover 3.7720 3.7760 5.2840
8-BIT SIGNED MULT
CURRENT_MULT CURRENT_NOGOTO_MULT D_FLOAT_MULT
tgood 2.7200 2.6200 1.9640
tover 2.5840 2.7320 3.7680
I'm attaching the diff FWIW.
... Close this bug report.
(file #44921)
_______________________________________________________
Additional Item Attachment:
File name: octave-int_remove_goto-djs2018aug31.patch Size:3 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?54572>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #54572] int64 does not saturate correctly in negative direction, (continued)
- [Octave-bug-tracker] [bug #54572] int64 does not saturate correctly in negative direction, John W. Eaton, 2018/08/29
- [Octave-bug-tracker] [bug #54572] int64 does not saturate correctly in negative direction, Dan Sebald, 2018/08/29
- [Octave-bug-tracker] [bug #54572] int64 does not saturate correctly in negative direction, Dan Sebald, 2018/08/29
- [Octave-bug-tracker] [bug #54572] int64 does not saturate correctly in negative direction, John W. Eaton, 2018/08/29
- [Octave-bug-tracker] [bug #54572] int64 does not saturate correctly in negative direction, Dan Sebald, 2018/08/29
- [Octave-bug-tracker] [bug #54572] int64 does not saturate correctly in negative direction, Dan Sebald, 2018/08/30
- [Octave-bug-tracker] [bug #54572] int64 does not saturate correctly in negative direction, Dan Sebald, 2018/08/30
- [Octave-bug-tracker] [bug #54572] int64 does not saturate correctly in negative direction, Dan Sebald, 2018/08/30
- [Octave-bug-tracker] [bug #54572] int64 does not saturate correctly in negative direction, John W. Eaton, 2018/08/30
- [Octave-bug-tracker] [bug #54572] int64 does not saturate correctly in negative direction, Dan Sebald, 2018/08/31
- [Octave-bug-tracker] [bug #54572] int64 does not saturate correctly in negative direction,
Dan Sebald <=