Тёмный

Solving the Primes to ONE TRILLION on the desktop! Plus PDP-11 vs Threadripper tested! 

Dave's Garage
Подписаться 808 тыс.
Просмотров 55 тыс.
50% 1

A custom prime sieve seeks the numbers up to one trillion before it is used to compare the performance of the legendary PDP-11 to the Threadripper. For my book on the spectrum, see: amzn.to/3XLJ8kY
Follow me for updates!
Twitter: @davepl1968 davepl1968
Facebook: davepl
Primes Project: github.com/Plu...
Sieve Code: github.com/dav...

Опубликовано:

 

26 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 447   
@BertLaverman
@BertLaverman Месяц назад
"Much to the dismay of the 11 people on earth..." Goody, I'm one of the 11?
@robbybobbyhobbies
@robbybobbyhobbies Месяц назад
I think he's underestimating the nerd to dullard (sorry) ratio in his audience.
@paulscarlett4346
@paulscarlett4346 Месяц назад
I thought he meant there were only 3 of us... 😅
@BertLaverman
@BertLaverman Месяц назад
@@paulscarlett4346 As in that saying: "There are only 10 types of people in the world... those who understand binary and those who do not." 🤓
@UnlikelyToRemember
@UnlikelyToRemember Месяц назад
claiming my spot on the list of 11 ...
@paulscarlett4346
@paulscarlett4346 Месяц назад
@@BertLaverman 👍
@michaelhull7873
@michaelhull7873 Месяц назад
"Incontrovertible mathematical proof that sometimes procrastination IS the valid choice" - AMEN! Thanks for the great vid as always!
@musiqtee
@musiqtee Месяц назад
(I realise that the above comment indefinitely procrastinated mine by its pre-existence…)
@MarianoLu
@MarianoLu Месяц назад
I was going to make this comment yesterday… but left it for today. Finally I have proof that all this time I was doing the right thing 😂
@zorro5651
@zorro5651 Месяц назад
This is also the reason to not try to travel to another star system any time soon.
@Shirocco7
@Shirocco7 Месяц назад
16:50 Sometimes, procrastination is the valid choice... gold lol!
@rwremsik
@rwremsik Месяц назад
I will be using this out of context. 😁
@AlexanderLiffers
@AlexanderLiffers Месяц назад
with data as evidence.
@egparker5
@egparker5 Месяц назад
I was writing a flight sim on a pdp -11/70 in the early 80’s and remember thinking if it were only 100x faster then I could be happy for the rest of my life. If you had told me I could buy a machine 2Million x faster with 1million times the memory in 40 years I would have fallen out of my chair. How lucky are we to have lived during this time in history.
@jcoterhals
@jcoterhals Месяц назад
A great perspective! But still - today's flight sims (and other games) aren't 2 million times better or a million times more enjoyable. Makes me wonder what all of this processing power is used for.
@sea-ferring
@sea-ferring Месяц назад
What really gets me is that we are producing silicon that functions at atomic scales. I remember being in university in the 1980s and my digital technology lecturer showing us how once we get to that scale things would not work well, yet silicon designers continue to (seemingly) work magic using geometry and topology. It just floors me.
@parrottm76262
@parrottm76262 Месяц назад
"I don't think you have the monitor for it." I actually LOL'ed at that one. I had almost as much fun watching this as Dave had in making it. Thanks!
@djr093r5
@djr093r5 Месяц назад
"640K should be enough for everyone" - Dave throwing shade at his former employer 😂😂
@Michael-sn1wq
@Michael-sn1wq Месяц назад
You mean it isn't ? 😲
@amos660
@amos660 Месяц назад
🤣
@thomasschuler5351
@thomasschuler5351 Месяц назад
fun fact: gates most probably never said that (at least he himself declined to)
@djr093r5
@djr093r5 Месяц назад
@thomasschuler5351 Probably. It's inclusion in context by a former Microsoft software engineer is just good, clean fun. Nice Easter egg for the fuddy-duddies...
@DavidSinanan
@DavidSinanan Месяц назад
The straight-faced, low-key shade being tossed was entirely epic.
@Sarabian69
@Sarabian69 Месяц назад
You are a son of a gun! You keep doing vids of things that I have no business needing to know, but can't help Wanting to know!! Keep 'em coming 🙂 and keep enjoying yourself. 🙂
@DavesGarage
@DavesGarage Месяц назад
Thanks! At least I'm having fun :-)
@BleuSquid
@BleuSquid Месяц назад
10:36 I just want everyone to stop and take a moment to appreciate how pleasing the right-edge alignment is on the sieve program.
@custardtart1312
@custardtart1312 Месяц назад
11:00 good until this point, where the bottom seconds are past the line. Boo!
@r2db
@r2db Месяц назад
"And there you have it, incontrovertible mathematical proof that some times procrastination is the valid choice." For years, I have said that if one wishes to truly master procrastination one must start early. There are also many different phases of procrastination, starting with protocrastination, then eventually achieving preprocrastination, then finally taking one's crastination skills to the professional level.
@DavidSinanan
@DavidSinanan Месяц назад
OMG Dave. I can't believe you've got the sheer determination and will to mesh that degree of fantastic information in a wonderful public speaking format WITH THE ENTIRE THING BEING A BUILDUP TO THIS PUNCHLINE. I love you. I'm so mad. That was amazing. Shade towards Bill, and then the final shoutout to procrastination. OMFG. What have you done? You just validated my Lady friend's ENTIRE MO!. (PS. I happened to grow up around the dude who ended up the Country Manager of Grand Cayman IBM, now CEO/Founder of Xenia, GC. ;) You're an absolute Legend. (You modest Hero, 'only 11 viewers'. pah!) I virtually never type in all caps. I currnelty live in Regina. The Northern Lights on top of the Perseid Meteor Shower was pretty cool last night. Peak of the shower is tonight (12th, after midnight). (ever notice how the D shift from 4 to 5 at night in the ionosphere effects computing? Fun stuf).
@gary-williams
@gary-williams Месяц назад
You can exploit a pattern in the primes to reduce the sieve size and search space, and simultaneously decrease the runtime. Primes > 2 can be expressed in the form 2k + 1, reducing the sieve size to n/2 bytes Primes > 3 can be expressed in the form 6k + {1,5}, reducing the sieve size to n/3 bytes Primes > 5 can be expressed in the form 30k + {1,7,11,13,17,19,23,29}, reducing the sieve size to n/30 bytes Primes > 7 can be expressed in the form 210k + {one of 48 offsets}, reducing the sieve size to n/35 bytes Primes > 11 can be expressed in the form 2310k + {one of 480 offsets}, reducing the sieve size to n/38.5 bytes Primes > 13 can be expressed in the form 30030k + {one of 5760 offsets}, reducing the sieve size to n/41.7 bytes Primes > 17 can be expressed in the form 510510k + {one of 92160 offsets}, reducing the sieve size to n/44.3 bytes. In fact, for every prime, there's a corresponding expression for further reducing the memory requirement. I use the 30k rule in my own high-performance sieve, and exploit the fact that there are exactly eight offsets to check, as this (being a power of 2) makes a further optimization possible.
@toby9999
@toby9999 Месяц назад
Might try that someday. I tested Dave's code on my i7 12700 with a few mods to C++ x64 under VS. I couldn't get much past the 100,000,000,000 limit due to memory constraints. Execution time 300secs
@stickinthemud23
@stickinthemud23 Месяц назад
OMG. 32005. That number grabbed my brain. Now, an hour or so later, I figured out why! It was the designation code (I forget the actual terminology) of the ship I served on when I was in the Navy and I typed and read that code every day! Wow. Small world.
@alphabasic1759
@alphabasic1759 Месяц назад
it's so nice to see all these DEC systems that I used in the past. My time at DEC was some of the best years of my career.
@Sam-y5o6j
@Sam-y5o6j Месяц назад
"A few years back".. the physically hurts me how quickly it's gone.
@jenislawski
@jenislawski Месяц назад
I just discovered your channel and I love the vintage vs. modern hardware, ASM and K&R C, and your insider's explanation of retro code. Thank you for promoting autism awareness. I hope people appreciate two examples of programming economy in the line (for j=i*i; j
@davidsuzukiispolpot
@davidsuzukiispolpot Месяц назад
My heart sank when you said we were not going to code walk the PDP11 assembly code.....
@Teckstudio
@Teckstudio Месяц назад
Same for me! Please Dave, jump the rabit hole and we will follow! 🤩
@SwichMad
@SwichMad Месяц назад
You've explained the prime algorithm 10 times better than my college programming teacher back in 2000's, and yes, we had to do it in assembly, pascal and C, as every task given.
@josephcote6120
@josephcote6120 Месяц назад
In my college days we got a FORTRAN assignment to calculate factorials. The size of results quickly blew out the integer value limit on our DEC-10. Solving this was the true intent of the assignment. Storing one digit per integer and writing our own math routines was the order of the day. And so many people completed the 100! challenge. But this wasn't good enough for me. I wrote a nice assembly program that packed nine decimal digits per 36 bit word. 1000! was mine. But they came out and yelled at me for bogging down the entire system for those few minutes. I'd do it again.
@chemistrymickey
@chemistrymickey Месяц назад
"From Ada to Zig". I'm so happy Zig exists now. I like how it handles errors as values but for some reason this is more important.
@iramoser3528
@iramoser3528 Месяц назад
For great justice, take off every Zig! :)
@spydermag5644
@spydermag5644 Месяц назад
I was hoping for the P-11 assembly code. I had a class where the teacher made us emulate a PDP-8 . We could use any language and I choose Pascal. I then made a C, C++, Java, JavaScript, C# and a few other versions.
@williamgraham2468
@williamgraham2468 Месяц назад
I had the pleasure of getting to use a pdp-8/I running TSS/8 for a couple of years. I taught myself BASIC and pdp-8 asm on it. Then one day it was gone, replaced by a pdp-11.
@EVPaddy
@EVPaddy Месяц назад
we didn't get the results either, did we?
@michaelhawthorne8696
@michaelhawthorne8696 Месяц назад
16:28 "It would be a third done.......already" 😂 Loved the inclusion of the word "already", tongue in cheek humour......
@milk-it
@milk-it Месяц назад
I'd love an Assembly deep dive, please!
@bubbavonbraun
@bubbavonbraun Месяц назад
So now we have "Dave's Law" or otherwise know as how to justify your Procrastination to a manager or spouse. Again terrific content.
@mahoneg
@mahoneg Месяц назад
Thanks Dave! - I liked this as soon as I saw the vt220. Love the font as well
@timotheegoulet1511
@timotheegoulet1511 Месяц назад
Yup one of my favorite RU-vidrs. This guy and Asianometry and Wristwatch Revival, Inheritance Maching, Sreetips...
@ravensmill3927
@ravensmill3927 Месяц назад
Wait, do we really have that much in common or is that the algorithm deciding what we want to watch?
@mahoneg
@mahoneg Месяц назад
Yes I like Asianometry as well😀
@kendokaaa
@kendokaaa Месяц назад
@@ravensmill3927 Both
@eskwadrat
@eskwadrat Месяц назад
Also... Dave, Marshall from W Revival and... Sabina, the German theoretical physicist my top 3.
@mickebarnes
@mickebarnes Месяц назад
I'm NOT procrastinating... I'm planning for the future!
@weinbergfahrer4048
@weinbergfahrer4048 Месяц назад
Thanks, Dave, for providing so much information and putting a smile on my face for 17 minutes!
@deechvogt1589
@deechvogt1589 Месяц назад
ROFL!! Love the conclusion!! OMG. Best justification ever!
@SubTroppo
@SubTroppo Месяц назад
At certain points I asked my self, "Why-O-why am I watching this?", but Dave came good with a verbal version of the tee-shirt I keep on meaning to create which reads "Procrastinate Now!" printed on it.
@NeilABliss
@NeilABliss Месяц назад
Procrastinating is definitely an option. I wrote a piece of music back in 1992that required me to process samples in order to realize the piece. Essentially working at encoding surround sound on a per sample basis. I had the venerable Mac LC 485 at the time. After processing the first sample, I went back to my prof and told him that realisation on the piece would have to wait until 2018, or until computers got faster . I finally realized the piece in 2014 with a Duo core realizing the piece in real time. 😅
@k9man163
@k9man163 Месяц назад
Is it uploaded anywhere?
@darojos
@darojos Месяц назад
I always knew procrastination was the right choice, now I have proof. Thanks!
@BobDpirate2
@BobDpirate2 Месяц назад
Love these PDP11 videos, throw back to my first job selling time on a pair of PDP11s with washing machine disks running RSTS/E in the mid 80s...
@billwall267
@billwall267 Месяц назад
Hope to see much more of the PDP-11s in future videos. Most existing YoutTube content focuses on history and not active use.
@KennethSorling
@KennethSorling Месяц назад
I love your final conclusions! Sometimes it's wiser to let technology catch up to match the magnitude of the problem you're trying to solve.
@fredericapanon207
@fredericapanon207 Месяц назад
As someone who was unable to figure out an algorithm to multiply two numbers in assembler (I kept running out room in the stack, plus I was quite sleep deprived as that module took place during the drama club's production of Guys and Dolls for which I did props -- yeah that tanked my CompSci100 marks) and whose Fortran was definitely better, I am in awe at your mad skillz.
@JT-kz7kq
@JT-kz7kq Месяц назад
In the macro-11 code, why not use a SOB instruction (subtract one branch nz) for the init zero loop? You wouldn't then need to use R2, just SOB R1, INITL. If BSIZE is even, then why not CLR instead of CLRB with a loop of BSIZE / 2 iters?
@DavesGarage
@DavesGarage Месяц назад
Hey, I was just pleased it worked and got the right answer :-). Good optimizations though!
@GentleRefreshingBreeze
@GentleRefreshingBreeze Месяц назад
I am dismayed that you did not do a detailed walk through of the assembly :) (maybe there are more than 11 of us lol ) love you content, thanks for sharing
@Sobow6
@Sobow6 Месяц назад
I took a course in college called Number Theory. That class instilled in me a healthy love for Prime numbers.
@NunTheLass
@NunTheLass Месяц назад
I made another entry of the 1..100 sieve with a Bic pencil and a piece of paper and wound up with an impressive 3 minutes and 22 seconds. It is a valid entry : I didn't cheat with a ruler and used 0's and 1's, following the algorithm 100% and I used a 53-year old machine. So I think I should be on the ranking table.
@FlightEagle
@FlightEagle Месяц назад
Thank you for the pointers to the font and 'Cool Retro Terminal' app for MacOS.
@17713bb
@17713bb Месяц назад
Great entertainment, thanks! This reminds me of my undergraduate work, about fifty years back, with the university's DEC-10. We had just changed from cards to terminals. When I entered a huge formula into my terminal, the system crashed. Now, I wish that I had tried a second time to determine if I really was the root cause of the crash.
@elpiibemaravilla
@elpiibemaravilla Месяц назад
hi dave, i consider myself as one of the eleven people that would enjoy the assembly walkthrough video
@charlieb.4273
@charlieb.4273 Месяц назад
Count me as one of the 11 people. I did a fair amount of machine language coding on z-80 machines back in the day. It was the only way to get stuff to run really fast. I would be curious as to how that experience compares to the PDP-11. Charlie in Virginia
@Sapious1
@Sapious1 Месяц назад
Thanks! I enjoyed that video, interesting to see where we’ve come with processing over the years.
@monawoka97
@monawoka97 Месяц назад
I'm 5 years into my software development career. Struggling to still find the magic in programming. Dude I swear your videos make me so happy. They remind me how fun and playful computer science can be. I genuinely hope to be like you after I retire
@ad5mq
@ad5mq Месяц назад
That's great! I used PDP computers in college, and at my first job we had a microvax cluster and a unix system with a couple of 68020 single board computers. It was clear even then that the 68k processors were superior, and they kept getting faster. DEC tried to sell us an upgrade to an Alpha server, but by then no one wanted a mini computer. the SBC and PC machines were cheaper and we knew they'd just keep getting faster.
@javabeanz8549
@javabeanz8549 Месяц назад
The RAM limit is why I wanted to go with disk storage. But it would take some thought to optimize the reads and writes to reduce the overhead of using the disk. Even with today's NVME drives, there would still be some overhead, just not as much. My first prime sieves were run on an original Atari 400. I had a Tandy PC-1 pocket computer, but with about 1200 bytes of RAM usable, I didn't see the point in even attempting a sieve on it. A point on the 386SX, that's only got a 16 bit path to the RAM, so a 386DX at the same speed should be almost twice as fast. With today's processors, you could pass off to extra threads, and really accelerate the process. Processors have come a long way in the last 45 years, from a few hundred kilohertz to several gigahertz. I remember being amazed by the results of freezing an 8088 and clocking it up over 20MHz.
@geoffstrickler
@geoffstrickler Месяц назад
For primes up to 120, you don’t need to remove multiples of 11. For primes up to n, you only need to test primes strictly less than sqrt(n+1) or alternatively
@stayfrost04
@stayfrost04 Месяц назад
Now imagine hitting all 96 cores simultaneously on the Threadripper. The performance upliftment obviously wound't scale 1:1 but it's still crazy to think about that the real difference in performance improvement over PDP-11 and 386SX can be another order of magnitude greater.
@johnvonhorn2942
@johnvonhorn2942 Месяц назад
If you are {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97} any of these years old we would say you're in the prime of your life.
@ah244895
@ah244895 Месяц назад
I am one of the 11, and i could understand just about all the terminology you used. I could program in 6502, 8086 and DEC10 assembly, but migrated onto C and then IBM AS400 and Oracle and unix etc....
@sudlow3860
@sudlow3860 Месяц назад
Beautiful log scale in that last graph!
@rogerp5816
@rogerp5816 Месяц назад
Thanks Dave, I would have never dreamed the Thread Ripper was going to be that much faster then the PDP-11/34.
@zonegamma8197
@zonegamma8197 Месяц назад
50 years of tech evolution
@MaltaMcMurchy
@MaltaMcMurchy Месяц назад
Thanks for putting together this informative video, Dave! 🌟
@aso4200
@aso4200 Месяц назад
Looked at the Primes Project. As a dane, i',m happy to see, that the good old danish Comal80 is represented, invented by Børge Christensen a teacher of high school. Not many today knows about this old programming language. My first teaching of programming, was in this language, on a likewise danish computer named Piccoline, made by danish Regne Centralen (RC), a computer system build around the Intel 80186 CPU. I very like, when you Dave, puzzle with old hardware. I like to see (and learn) what was before, what we have today. Keep up the good work.
@thegreeneyej
@thegreeneyej Месяц назад
Thanks Dave.
@diego001
@diego001 Месяц назад
I want a detailed run through of the MACRO-11 ASM code! Maybe as a supplemental video?
@RichTheEngineer
@RichTheEngineer Месяц назад
Twelve. I was liaison to a company that we bought automated warehouses, including automated material handling carts which followed segmented wires embedded in floor. All of it was controlled by a PDP-11/44 running inventory control and master dispatching (actually two, backup system kept in sync, with God's own A/B switch to manually switch primary (active) system. PDP-11/23 was used for control of carts, using wiring as radio antenna. All code was developed in MACRO-11. Yep, inventory database manager was in MACRO-11, cart and automated crane dispatching in MACRO-11, reporting in MACRO-11, operator display (VT-100s) handling in MACRO-11. It was gloriously fun!
@velho6298
@velho6298 Месяц назад
It's so funny to see that KR C used to specify types separately in functions 😅
@ralfbaechle
@ralfbaechle Месяц назад
I've last done that myself for UNIX V7 ... which was a while ago. That said, K&R C not completely dead. There are some code generators that only generate K&R C or the .c and .h files they have generated ages ago and nobody feels the motivation to rewrite those generators for little immediate gain.
@gerryiles3925
@gerryiles3925 Месяц назад
Hmmm, I wonder why it said "Prime validator :FAIL" at 10:59...
@thomasschuler5351
@thomasschuler5351 Месяц назад
@@gerryiles3925 the numbers are not in the lookup list
@DarrenYung
@DarrenYung Месяц назад
Your VT220 term is missing the curved glare of the glass screen AND the screen burn-in from the electrons hitting the phosphor coating! Oh, and love the conclusion! Procrastination. I think I'll just wait.
@wtmayhew
@wtmayhew Месяц назад
The next version will have to incorporate simulated screen burn-in. I noticed back in the day that burn-in seemed worse on amber than green monitors. For color emulation, it needs to have the horizontal shadows of Trinitron tension wires - assuming it is emulating a Sony monitor. Also, a few permanently dark random pixels will help recreate the analog vibe.
@DarrenYung
@DarrenYung Месяц назад
Trinitron FTW!
@wtmayhew
@wtmayhew Месяц назад
@@DarrenYung Yep, the Infamous Trinitron shadow.!
@glasser2819
@glasser2819 Месяц назад
Brilliant - Uncle Dave can write Assembly easier than C for older machines 👏
@albertocsm
@albertocsm Месяц назад
cool episode man. thanks!
@amos660
@amos660 Месяц назад
I would try to go non-variadic though... probably... I dunno. Love the video and You, Dave! thx so much for uploading all this cool stuff.
@Moonlight0551
@Moonlight0551 Месяц назад
I love it. I have tried the two assembly examples with my PiDP11 and would love to see a walkthrough of that code as I had a couple of hiccups.
@DIYDaveOK
@DIYDaveOK Месяц назад
Dave, man, I love hearing a true programmer who still understands the value of a C bitmask. I deal with developers who barely comprehend the word. As a K&R C guy from college and someobe who grew up on UNIX, MS-DOS, and even QuickC, I think I'd have loved working with you and your teams had I that chance back in the day. Love your channel and this video in particular.
@DavesGarage
@DavesGarage Месяц назад
My favorite interview question was counting the number of bits set in a byte. Best solution is while (val & v-1) count++; So it only does one operation per bit that is actually set. Cool.
@georgesbv1
@georgesbv1 Месяц назад
@@DavesGarage you missed something and it doesn't make sense. I see it is a K&R solution, too while ( (n &= (n - 1)) ) count++;
@velho6298
@velho6298 Месяц назад
Great video Dave! Always fun to see how these older machines used to work! Perhaps I need look for an emulator for the PDP11
@thomasschuler5351
@thomasschuler5351 Месяц назад
@@velho6298 simh is a nice one. or google "pidp-11", if you also want blinkenlights
@dingolovethrob
@dingolovethrob Месяц назад
entertaining as always. Procrastination finally proven to be the best approach.
@briankowald6465
@briankowald6465 Месяц назад
The Fortran programs I worked on for a PDP 11 in 1983 communicated over serial ports. The serial port code was written in assembler.
@SanityIT
@SanityIT Месяц назад
When Dave explains anything it is like listening to poetry.
@VolJoe
@VolJoe Месяц назад
The Mach 10! You’re the only other person I’m aware of who has one. 😂 love this episode
@sea-ferring
@sea-ferring Месяц назад
Nice programming Dave. More than your programming skill, I love how readable and literate your code is. It may seem pedantic, but I have worked with many brilliant programmers whose code is garbage due to being completely unmaintainable.
@dondemcsak5925
@dondemcsak5925 Месяц назад
The next logical test would be to run the sieve against GPUs and NPUs, since they focus floating point and integer based calculations in parallel.
@mytech6779
@mytech6779 Месяц назад
Of course knowing that it would take decades, the program could be structured to write the current state of the sieve to disk when prompted so it can be transfered to new hardware every few years as upgrades become availible. (Assuming the algorithm output is desired for somthing other than a benchmark, and if the algorithm is the most efficient known for the task. I know there are faster algorithms than the sieve if primes were the only purpose.)
@samaitcheson7057
@samaitcheson7057 Месяц назад
Some of your best ever one-liners Dave 😂
@BuggageandGlitchage
@BuggageandGlitchage Месяц назад
Infinity procrastination achieved, best not to start at all and go fishing instead.
@MrRmeadows
@MrRmeadows Месяц назад
The visual here is really helpful. Cool. I see you algorithm without reading it.
@RudysRetroIntel
@RudysRetroIntel Месяц назад
Very cool and fun!! Question: Why in some cases does Prime Validator say PASS and others times it says FAIL?? Thanks for sharing
@borovitinshund
@borovitinshund Месяц назад
I looked in the GitHub repo and the last commit message states "Fix validator bug due to int size". I assume Dave captured the video and only when editing that part found & fixed that bug (I think the expected value for 500.000 was just missing initially which caused the "FAIL"; Dave in that commit also added another C-file called memory.c that has it's own main and no .h file, not sure what that file is for in that context).
@swenic
@swenic Месяц назад
Happy (prime?) birthday and thanks you for the content,
@hansangb
@hansangb Месяц назад
Finally... an empirical evidence that procrastination is the right choice! Thank you Dave!! :)
@henrywycislo9454
@henrywycislo9454 Месяц назад
This was funny.. I need to write the part about procrastination!
@amos660
@amos660 Месяц назад
🤣 "procrastination is the best choice" you killing me 🤣.. Mythical Man Month stuff here... you the best
@jimmynoo
@jimmynoo Месяц назад
brilliant
@coldlyanalytical1351
@coldlyanalytical1351 Месяц назад
I used to cross assemble around 8k of microprocessor code on a pdp11/34 under rsx-11m. I was allowed ONE assemble per DAY. Each assembler run took AGES. You soon made sure that any code you submitted had a 99% chance of working!
@sturdyfool103
@sturdyfool103 Месяц назад
It’s always fun to see the ping-ponging of projects between developers isn’t anything new
@NigelBassman
@NigelBassman Месяц назад
“So the code will look a little retro”. Just like me. 😂 (And some of my code. I still have my copy of K&R somewhere…)
@DjVortex-w
@DjVortex-w Месяц назад
The naive implementation of the sieve algorithm is inefficient in modern hardware. That's because since it's going linearly through the entire enormous bit array again and again, it's constantly causing cache misses. The worst case is when the bit array is larger than even the outermost L3 cache, in which case each pass will cause one or more worst-case-scenario cache misses. The exact same algorithm can be implemented in a more cache-friendly manner: Rather than going through the entire bit array, marking multiples of the current prime, instead you do it in segments: Select a segment size that's slightly smaller than the size of L1 cache, and mark each segment fully before going to the next segment. This maximizes the work done on the L1 cache and, thus, minimizes the number of cache misses. The speed difference is not inconsequential. You can easily double, triple, even quadruple the speed of the entire thing in this manner (depending on the particular hardware you are using). Those cache misses are extraordinarily expensive. There's also another advantage of doing it like that: As you might have surmised, the calculations done on each segment are completely independent on each other, and can be done independently. Things done in one segment do not depend in any way on things done in other segments. So you might guess where this is going: Indeed, this segmented version of the algorithm is very easy to parallelize to multiple cores, and the increase in speed is almost linear to the number of cores. Have 16 cores? The entire thing will be done almost 16 times faster compared to doing it with one single core. What's better, if you select a segment size that's a multiple of the cache stride, you don't even need any mutual exclusion, no locking, nothing. You can bypass all that and thus get maximum multithreaded speed. Because each thread will operate on its own independent segment, separate from the rest, they don't interfere with each other.
@jakebrodskype
@jakebrodskype Месяц назад
A friend and I used to race programmable calculators and early microcomputers to see who could get a prime number above 10,000 first. Later, as I learned about the Sieve of Eratosthenes I realized we were doing it all wrong. But we usually didn't have the memory to do it right. Then I got access to a LSI 11/23. And it was a huge step forward. But by then we had actual work to do, so my interest stopped there. Nevertheless, your presentation brought back many memories. And by the way, Macro-11 was one of my favorite programming languages. I liked writing libraries of macros so that it practically looked like a different language. And I know I'm likely to start a flame war, but I kinda liked using TECO with a series of TECO macros and a WYGIWYAF display screen.
@BillyMcCord
@BillyMcCord Месяц назад
That is one of the nerdiest things I've ever seen and it made me smile... Awesome content ...
@captmulch1
@captmulch1 Месяц назад
Love it Dave!
@QuantumParadox
@QuantumParadox Месяц назад
Good video. I love your videos, sir. you have a subscriber for life!
@dsudikoff
@dsudikoff Месяц назад
11 people on earth for MACRO-11. Count me in. Make it 12!
@htpc002Weirdhouse
@htpc002Weirdhouse Месяц назад
11:01 "Count of primes found: 41538 ; Prime validator: FAIL". 11:48 "Count of primes found: 41538 ; Prime Validator: PASS". I suspect a source change without a version change from "v2.02".
@wasdaletimelapse7658
@wasdaletimelapse7658 Месяц назад
I'm hoping that just one day I might understand something you are talking about, I just hope it does'nt spoil the enjoyment if it happens.😂😂 Thanks Dave.
@chrisyu98
@chrisyu98 Месяц назад
thank you for validating my procrastination method of doing things....... :-)
@whiskerlesswalrus
@whiskerlesswalrus Месяц назад
Reminds me of "Deep Thought" that got the answer of 42 but couldn't remember the original question because it took so long to compute the answer
@curtisframsey
@curtisframsey Месяц назад
Keep up the good work!
@fundip43
@fundip43 Месяц назад
the level of geekdom is legendary and I love it ha
@kensmith5694
@kensmith5694 Месяц назад
When I got it, may 386DX at 25MHz was "spooky fast". On many things the "I'm done" would seem to come up as soon as I hit return.
@1George2
@1George2 Месяц назад
informative AND entertaining!
Далее
FOUND: A Super-Rare Commodore D9090!
29:36
Просмотров 124 тыс.
Set up a Local AI like ChatGPT on your own machine!
13:22
Ozoda & Dilime - Lada
00:36
Просмотров 1,4 млн
Windows vs 30 Hard Drives - Can it Do it!?  Find out!
23:59
These Illusions Fool Almost Everyone
24:55
Просмотров 3,7 млн
The search for the biggest shape in the universe.
18:49
Why is Japan So Weak in Software?
19:37
Просмотров 637 тыс.
The Trash Computer That Became Your Phone
31:27
Просмотров 165 тыс.
MS-DOS has been Open-Sourced!  We Build and Run it!
15:01