[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51630] BIST test for log2 fails on Windows
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #51630] BIST test for log2 fails on Windows |
Date: |
Tue, 1 Aug 2017 23:55:42 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0 |
Follow-up Comment #8, bug #51630 (project octave):
It's a bummer, but I did some benchmarking and going through gnulib is
definitely slower. Perhaps because there is still at least one pointer
indirection.
Results:
############################################################
# Original Code
# [f,e] = log2 (x); # Doubles
############################################################
N = 50
mean/median/std
ans = 0.15986
ans = 0.15984
ans = 0.0034181
mean/median/std
ans = 0.16033
ans = 0.16011
ans = 0.0040094
############################################################
# New Code (std::frexp replace all modules)
# [f,e] = log2 (x); # Doubles
############################################################
N = 50
mean/median/std
ans = 0.090051
ans = 0.089767
ans = 0.032139
ans = 0.094046
ans = 0.093920
ans = 0.034130
It's a 42% decrease in runtime from 160 milliseconds to 92 milliseconds. This
was on a 10e6 point vector. Maybe it would be worth it to have special code
at some point to detect MingW or MSVC in the configure script. I guess that
can happen later if we ever get around to it.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51630>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/