« first day (54 days earlier)      last day (261 days later) » 

8:04 AM
I copied your unrolled loops over to my code and saw a 4% boost on first results
 
 
1 hour later…
9:18 AM
I don't have time to look at packed cache today, probably. I just did a couple of tries on various options for last_curl (making it a bool, different positions in loops). I lost track of exact speed up %. Sent my current version to my brother, I hope he's got some spare time to do a benchmark run
I think I increased to 4% I mentioned above into a 5 or 6%
Oh and I only just noticed you fixed almost all warnings! Awesome :)
Only one warning left about the index + base.. if we can't solve that I'm willing to suppress it ;)
 
9:39 AM
Got an average 6 to 7% increase over the version I sent you yesterday. Very curious if that % holds on my brother's pc (so that's ~4% from unrolling and an additional 2 to 3% by changing some more last_curl things)
 
 
2 hours later…
11:12 AM
My brother is somehow getting slow times for no occurent reason. Will wait for you to confirm numbers
 
 
1 hour later…
12:32 PM
Microsoft Azure gives you a €170 / $200 start budget.. currently checking :)
The program used for that requires Linux.. would need to sideload that. Let's see if I can find specifications first
 
12:59 PM
azure.microsoft.com/en-us/blog/… if you scroll down a bit you see F64s_v2. That one costs €2.27 / hour
Cannot find my balance though.. should be at least €100 because I registered as a student from my university
 
1:10 PM
Ahh I see $100 now. That should get us 28 hours of the F64s_v2
Hmm 28 hours with 64 threads @~3GHz is probably equal to a weekend of your Linux pc. Not much new to that.. except the fun and test of deploying a virtual Linux run with 32 cores
 
 
2 hours later…
3:32 PM
Well, that 64-core is 8 times my 8-cores. When (if?) we figure problem with cache, we can go higher on their 128 GB...
Surprised that you had to merge my changes; I sent you your code, unrolled, last night.
I saw some speed up, but not consistent.
 
Yes but as I understood, that used packed cache; although I did not even check that, to be honest. And since you did not find much better timings, I copied it over
Good morning, by the way :)
 
4:36 PM
Good morning / evening!
 
4:57 PM
timing OLD 36-bit-cache code, want to compare to 32-bit to see if it's worth the effort
Ambitiously started with length=37; then looked at my old records and realized it would take 35 MINUTES!!!
 
5:20 PM
Looks like 6% speedup on length 35:

old cache 36
Build cache [36]: 81809 ms
35: 426 sec

Build cache [32]: 8857 ms
35: 402 sec
For most frequent crul=2, we can start looping with 13 (for 36-bit) vs 11 (for 32-bit) - right?
With longer length this will play ever decreasing role, I think.
May be we should compare long runs with and without the cache?
 
I tried our newest version with cache 30 and 32 and measured hardly any difference
Hahaha 35 minutes on length 37... That was ambitious indeed :)
30 vs 32 was something like a 1 or 2% difference if I remember correctly
 
It was just ONE month ago!

// First version: 18-11-2020; estimated time to length 48: 250 years*
// Current version: 16-12-2020; estimated time to length 48: 42 days*
 
Could you maybe confirm speed up of the last version I sent you? Since my brother had quite different numbers
 
Awesome :)
The speed-up has been insane. A 7% off every version really makes a difference when it's done 20 times. And then the back-tracking made a big difference as well
 
5:31 PM
If we are talking about your yesterday's version - I timed it already. Here it is as-is (your code):
Steven
Build cache: 11318 msec
length: 8, tail: 58, duration: 2 msec
length: 9, tail: 59, duration: 1 msec
length: 10, tail: 60, duration: 1 msec
length: 11, tail: 112, duration: 1 msec
length: 12, tail: 112, duration: 1 msec
length: 13, tail: 112, duration: 1 msec
length: 14, tail: 118, duration: 1 msec
length: 15, tail: 118, duration: 1 msec
length: 16, tail: 118, duration: 1 msec
length: 17, tail: 118, duration: 1 msec
length: 18, tail: 118, duration: 1 msec
length: 19, tail: 118, duration: 2 msec
and here it is with my unrolled loops:
unrolled
Build cache: 10363 msec
length: 8, tail: 58, duration: 2 msec
length: 9, tail: 59, duration: 1 msec
length: 10, tail: 60, duration: 1 msec
length: 11, tail: 112, duration: 1 msec
length: 12, tail: 112, duration: 1 msec
length: 13, tail: 112, duration: 1 msec
length: 14, tail: 118, duration: 1 msec
length: 15, tail: 118, duration: 1 msec
length: 16, tail: 118, duration: 1 msec
length: 17, tail: 118, duration: 1 msec
length: 18, tail: 118, duration: 2 msec
length: 19, tail: 118, duration: 2 msec
 
That's the timing of the last one I sent you? That's pretty much equal
 
yeap
length 41 for example, shows ~3% speedup, but 42 is slower.
I would get similar differences by running the SAME code multiple times... Noise
Should try on 48 and up, but can't load my computer for that long during work
 
I had quite consistent timings.. only length 44 had some quite bizarre speed-up (twice). And my newest version was consistently 3% faster than your unrolled loops, which was consistently faster than my previous version
 
Hmm... I timed your code as soon as I got it yesterday, and the results were pretty similar to what I had before.
Can this be explained by me having more cores? I know they are not utilized, but I am running on 6 cores + 2 hyper-threads, while you - on 4 + 4
 
5:51 PM
Ooh I probably never sent you my newest version! That's the one with 3% increase
I only sent it to my brother.. oops
I was already confused.. because I made that one while you were sleeping, so you couldn't have tested that one
Since we don't utilize 100% cpu (it's 93 for me), it shouldn't cause a noticeable difference, I think
 
will try shortly
 
Quite curious that you measure 1 msec on short runs. I measure always at least 9msec, sometimes 10
 
6:09 PM
Can't explain that :)
So - we can't just through the cache out. On my recent code, for the length=44, it took 285 sec with 32-bit cache and 465 sec with no cache!
I see no time difference between your today code vs yesterday:
Build cache: 11404 msec
length: 8, tail: 58, duration: 3 msec
length: 9, tail: 59, duration: 2 msec
length: 10, tail: 60, duration: 1 msec
length: 11, tail: 112, duration: 2 msec
length: 12, tail: 112, duration: 1 msec
length: 13, tail: 112, duration: 1 msec
length: 14, tail: 118, duration: 1 msec
length: 15, tail: 118, duration: 1 msec
length: 16, tail: 118, duration: 1 msec
length: 17, tail: 118, duration: 1 msec
length: 18, tail: 118, duration: 2 msec
length: 19, tail: 118, duration: 2 msec
length: 20, tail: 118, duration: 3 msec
 
Well that's weird...
Yes cache is necessary but it has diminishing returns
 
OK, explain this. Went back to my cache bencmaking, length 44, various cache width.
32 - 285 sec
30 - 279 sec
(also took 7 sec less to build short cache)
running 28-bit test now
I guess cache width should be divisible by 3?
will test 27 next
 
6:31 PM
Divisible by 3 definitely is most useful, that's why I suggested 33. But packing and unpacking makes that useless again, so we should need unpacked multiple of 3
 
WAIT! I think we misread those results from above:


Looks like 6% speedup on length 35:

old cache 36
Build cache [36]: 81809 ms
35: 426 sec

Build cache [32]: 8857 ms
35: 402 sec

32-bit was FASTER than 36-bit!
Can you do 33-bit unpacked on your system?
Also, I think packed vs unpacked didn't show any performance differences, so (if I fix it) packed is better, as we can go to 36
 
6:48 PM
I cannot do unpacked 33 on my laptop, but my brother should be able to do it
 
on current code, 27-bit cache is the same time as 30-bit...
 
7:08 PM
I tested 21, 24, 27, 28, 30 and 32-bit cache. Here are the results:
32-bit	Build cache: 10207 msec
	length: 44, tail: 120, duration: 285786 msec

none	Build cache: 0 msec
	length: 44, tail: 120, duration: 465184 msec

30-bit	Build cache: 2567 msec
	length: 44, tail: 120, duration: 279808 msec

28-bit	Build cache: 703 msec
	length: 44, tail: 120, duration: 282513 msec

27-bit	Build cache: 354 msec
	length: 44, tail: 120, duration: 278433 msec

24-bit	Build cache: 58 msec
	length: 44, tail: 120, duration: 289223 msec

21-bit	Build cache: 17 msec
	length: 44, tail: 120, duration: 307297 msec
When you have a chance, could you please try 32 (it's a current default, I think), 30 and 27?
 
So that shows that 27/30 might be best
I am currently at my girlfriend's without power cord so can't do any testing.. will have to wait till later tonight or tomorrow
 
Cool! Just a note: I usually run a loop from 8 to 40 (to male sure no tails got off). Just ran it with 30-bit cache, with typical fluctuation (no diff vs 32-bit).
That makes me think: may be my packed 36-bit cache works OK, but just doesn't speed things up? And I am looking for the error that is not there?

That reminds me of one of my favorite quotes (applicable to programming):
It's hard to find a black cat in a dark room. Especially, if there is no cat.
 
Yes it could have been that 36 makes no difference. It did before, but we didn't use prefetch back then, so that could explain why there is no difference at all
I like that quote :) that's a very good one
I do remember that my run on 32 vs 30 came down to something like 46... vs 47... where 30 was the slower one. But that is really a very small difference and might even be noise
 
7:33 PM
I am still wondering why I had a stable speed increase while you and my brother had none at all
 
8:12 PM
Diff project settings? Also, I'm using VS 2017, not sure if it makes any difference
 
My brother and I are on identical VS2019
I am not sure if our flags are still the same as yours after a recent update
 
 
1 hour later…
9:29 PM
Confirmed cache behavior on Linux: 27-bit is a little better than 30, and they are better than 32 and 36.
25- and 24-bit are a little slower.
 
9:57 PM
Since I converted the new code to Linux (gcc), confirmed 1.7 ratio up to the length=44.
Estimate 24 min to 48, can try during my next meeting
After that, can try to convert our code to use gcc's extended 128-bit integer type, with a one-shot bit shift.
That may NOT be useful, as there are no asm instruction that do that, could be just a shorthand
Yeap, my suspicion were correct: gcc.godbolt.org/z/4rcr1q
 
10:24 PM
Hahaha unfortunately I cannot read that gibberish :)
I am going to sleep. Would you mind sending over the Linux script along with the gcc command? Maybe I will give a very short try at a VM tomorrow, although I am a bit busy
 
Will do. Good night!
Confirmed 24 min on Linux to 48:

Finish: Tue Jan 19 14:30:37 2021
Length: 48, cache: 27, tail: 131, time: 1451 sec
 
Awesome! Length 56 now takes only 28 hours instead of the previous whole weekend it took :)
 

« first day (54 days earlier)      last day (261 days later) »