[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52342] vecnorm command
From: |
Marco Caliari |
Subject: |
[Octave-bug-tracker] [bug #52342] vecnorm command |
Date: |
Tue, 7 Nov 2017 02:36:26 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0 |
Follow-up Comment #8, bug #52342 (project octave):
@Rik: thanks, but even with your benchmark I get
octave:2> bm_abs
p = 1
abs: 0.714665
vec: 1.971066
p = 2
abs: 0.521653
vec: 0.423401
p = 3
abs: 0.528376
vec: 1.997253
p = 4
abs: 2.186915
vec: 0.267811
p = 5
abs: 2.248042
vec: 1.992120
p = 6
abs: 2.245626
vec: 0.280838
p = 7
abs: 2.230526
vec: 1.960336
p = 8
abs: 2.222762
vec: 1.882994
The vectorized code is in general faster, even for the most common p=2 (and
apart from the weird cases). This is true both in 4.2.1 and 4.3.0+. It was
always true for me: in fact, I teach my students this trick since a long
time.
Anyway, this is a different topic, I can write vecnorm in the easy way (with
abs).
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52342>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #52342] vecnorm command, CH, 2017/11/05
- [Octave-bug-tracker] [bug #52342] vecnorm command, Marco Caliari, 2017/11/06
- [Octave-bug-tracker] [bug #52342] vecnorm command, CH, 2017/11/06
- [Octave-bug-tracker] [bug #52342] vecnorm command, Marco Caliari, 2017/11/06
- [Octave-bug-tracker] [bug #52342] vecnorm command, CH, 2017/11/06
- [Octave-bug-tracker] [bug #52342] vecnorm command, Marco Caliari, 2017/11/06
- [Octave-bug-tracker] [bug #52342] vecnorm command, CH, 2017/11/06
- [Octave-bug-tracker] [bug #52342] vecnorm command, Rik, 2017/11/07
- [Octave-bug-tracker] [bug #52342] vecnorm command, Rik, 2017/11/07
- [Octave-bug-tracker] [bug #52342] vecnorm command,
Marco Caliari <=
- [Octave-bug-tracker] [bug #52342] vecnorm command, Marco Caliari, 2017/11/08
- [Octave-bug-tracker] [bug #52342] vecnorm command, Rik, 2017/11/09