On Thursday, 27 February 2020 at 21:46:08 UTC, Bruce Carneal
wrote:
On Thursday, 27 February 2020 at 19:46:23 UTC, Basile B. wrote:
[...]
The code below is the test jig that I'm using currently. It is
adopted from yours but has added the -d=distribution command
line option.
[...]
Yes I
On Friday, 28 February 2020 at 10:11:23 UTC, Bruce Carneal wrote:
On Friday, 28 February 2020 at 06:50:55 UTC, 9il wrote:
On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B.
wrote:
So after reading the translation of RYU I was interested too
see if the decimalLength() function can be
On Friday, 28 February 2020 at 10:11:23 UTC, Bruce Carneal wrote:
On Friday, 28 February 2020 at 06:50:55 UTC, 9il wrote:
bsr can be done in one/two CPU operation, quite quick. But
core.bitop.bsr wouldn't be inlined. Instead, mir-core
(mir.bitop: ctlz) or LDC intrinsics llvm_ctlz can be used
On Friday, 28 February 2020 at 10:11:23 UTC, Bruce Carneal wrote:
On Friday, 28 February 2020 at 06:50:55 UTC, 9il wrote:
On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B.
wrote:
So after reading the translation of RYU I was interested too
see if the decimalLength() function can be
On Friday, 28 February 2020 at 06:50:55 UTC, 9il wrote:
On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B. wrote:
So after reading the translation of RYU I was interested too
see if the decimalLength() function can be written to be
faster, as it cascades up to 8 CMP.
[...]
bsr can
On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B. wrote:
So after reading the translation of RYU I was interested too
see if the decimalLength() function can be written to be
faster, as it cascades up to 8 CMP.
[...]
bsr can be done in one/two CPU operation, quite quick. But
On Thursday, 27 February 2020 at 19:46:23 UTC, Basile B. wrote:
Yes please, post the benchmark method. You see the benchmarks I
run with your version are always slowest. I'm aware that rndGen
(and generaly any uniform rnd func) is subject to a bias but I
dont thing this bias maters much in the
On Thursday, 27 February 2020 at 17:17:32 UTC, Bruce Carneal
wrote:
On Thursday, 27 February 2020 at 17:11:48 UTC, Basile B. wrote:
On Thursday, 27 February 2020 at 15:29:02 UTC, Bruce Carneal
wrote:
On Thursday, 27 February 2020 at 08:52:09 UTC, Basile B.
wrote:
I will post my code if there
On Thursday, 27 February 2020 at 17:11:48 UTC, Basile B. wrote:
On Thursday, 27 February 2020 at 15:29:02 UTC, Bruce Carneal
wrote:
On Thursday, 27 February 2020 at 08:52:09 UTC, Basile B. wrote:
I will post my code if there is any meaningful difference in
your subsequent results.
give me
On Thursday, 27 February 2020 at 15:29:02 UTC, Bruce Carneal
wrote:
On Thursday, 27 February 2020 at 08:52:09 UTC, Basile B. wrote:
I will post my code if there is any meaningful difference in
your subsequent results.
give me something I can compile and verify. I'm not there to
steal, if you
On Thursday, 27 February 2020 at 15:29:02 UTC, Bruce Carneal
wrote:
big snip
TL;DR for the snipped: Unsurprisingly, different inputs will lead
to different timing results. The equi-probable values supplied
by a standard PRNG differ significantly from an equi-probable
digit input. In
On Thursday, 27 February 2020 at 14:12:35 UTC, Basile B. wrote:
On Wednesday, 26 February 2020 at 22:07:30 UTC, Johan wrote:
On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B.
wrote:
[...]
Hi Basile,
I recently saw this presentation:
https://www.youtube.com/watch?v=Czr5dBfs72U
On Thursday, 27 February 2020 at 08:52:09 UTC, Basile B. wrote:
On Thursday, 27 February 2020 at 04:44:56 UTC, Basile B. wrote:
On Thursday, 27 February 2020 at 03:58:15 UTC, Bruce Carneal
wrote:
Maybe you talked about another implementation of
decimalLength9 ?
Yes. It's one I wrote after
On Wednesday, 26 February 2020 at 22:07:30 UTC, Johan wrote:
On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B. wrote:
[...]
Hi Basile,
I recently saw this presentation:
https://www.youtube.com/watch?v=Czr5dBfs72U
Andrei made a talk about this too a few years ago.
It has some
On Thursday, 27 February 2020 at 09:41:20 UTC, Basile B. wrote:
On Thursday, 27 February 2020 at 09:33:28 UTC, Dennis Cote
wrote:
[...]
Sorry but no. I think that you have missed how this has changed
since the first message.
1. the way it was tested initially was wrong because LLVM was
On Thursday, 27 February 2020 at 09:33:28 UTC, Dennis Cote wrote:
On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B. wrote:
So after reading the translation of RYU I was interested too
see if the decimalLength() function can be written to be
faster, as it cascades up to 8 CMP.
Perhaps
On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B. wrote:
So after reading the translation of RYU I was interested too
see if the decimalLength() function can be written to be
faster, as it cascades up to 8 CMP.
Perhaps you could try something like this.
int decimalDigitLength(ulong
On Thursday, 27 February 2020 at 04:44:56 UTC, Basile B. wrote:
On Thursday, 27 February 2020 at 03:58:15 UTC, Bruce Carneal
wrote:
Maybe you talked about another implementation of
decimalLength9 ?
Yes. It's one I wrote after I saw your post. Psuedo-code here:
auto d9_branchless(uint v)
On Thursday, 27 February 2020 at 03:58:15 UTC, Bruce Carneal
wrote:
Maybe you talked about another implementation of
decimalLength9 ?
Yes. It's one I wrote after I saw your post. Psuedo-code here:
auto d9_branchless(uint v) { return 1 + (v >= 10) + (v >=
100) ... }
Using ldc to target
On Thursday, 27 February 2020 at 03:58:15 UTC, Bruce Carneal
wrote:
On Wednesday, 26 February 2020 at 23:09:34 UTC, Basile B. wrote:
On Wednesday, 26 February 2020 at 20:44:31 UTC, Bruce Carneal
wrote:
After shuffling the input, branchless wins by 2.4X (240%).
snip
Let me know if the
On Wednesday, 26 February 2020 at 23:09:34 UTC, Basile B. wrote:
On Wednesday, 26 February 2020 at 20:44:31 UTC, Bruce Carneal
wrote:
After shuffling the input, branchless wins by 2.4X (240%).
I've replaced the input by the front of a rndGen (that pops for
count times and starting with a
On Wednesday, 26 February 2020 at 20:44:31 UTC, Bruce Carneal
wrote:
The winning function implementation lines up with that
distribution. It would not fare as well with higher entropy
input.
Using sorted equi-probable inputs (N 1 digit numbers, N 2 digit
numbers, ...) decimalLength9_0 beats
On Wednesday, 26 February 2020 at 22:07:30 UTC, Johan wrote:
On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B. wrote:
[...]
Hi Basile,
I recently saw this presentation:
https://www.youtube.com/watch?v=Czr5dBfs72U
It has some ideas that may help you make sure your measurements
are
On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B. wrote:
So after reading the translation of RYU I was interested too
see if the decimalLength() function can be written to be
faster, as it cascades up to 8 CMP.
...
Then bad surprise. Even with ldmd (so ldc2 basically) feeded
with
On Wednesday, 26 February 2020 at 19:44:05 UTC, Bruce Carneal
wrote:
On Wednesday, 26 February 2020 at 13:50:11 UTC, Basile B. wrote:
On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B.
wrote:
...
foreach (i; 0 .. count)
sum += funcs[func](i);
The input stream is highly
On Wednesday, 26 February 2020 at 13:50:11 UTC, Basile B. wrote:
On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B. wrote:
...
foreach (i; 0 .. count)
sum += funcs[func](i);
The input stream is highly predictable and strongly skewed
towards higher digits.
The winning
On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B. wrote:
How is that possible ?
It turns out that there's a problem with the benchmarking method.
With command line argument the different optimization passes of
LLVM don't fuck up with the literal constants.
It appears that none of
On Wednesday, 26 February 2020 at 00:50:35 UTC, Basile B. wrote:
So after reading the translation of RYU I was interested too
see if the decimalLength() function can be written to be
faster, as it cascades up to 8 CMP.
[...]
It can be made faster using binary search. Not by much though.
On Wednesday, 26 February 2020 at 01:10:07 UTC, H. S. Teoh wrote:
On Wed, Feb 26, 2020 at 12:50:35AM +, Basile B. via
Digitalmars-d-learn wrote: [...]
#!dmd -boundscheck=off -O -release -inline
[...]
TBH, I'm skeptical of any performance results using dmd. I
wouldn't pay attention to
On Wed, Feb 26, 2020 at 12:50:35AM +, Basile B. via Digitalmars-d-learn
wrote:
[...]
> #!dmd -boundscheck=off -O -release -inline
[...]
TBH, I'm skeptical of any performance results using dmd. I wouldn't pay
attention to performance numbers obtained this way, and rather look at
the
30 matches
Mail list logo