E02: What is the FASTEST Computer Language - 45 Tested: Round Two! (E02)

  Рет қаралды 107,582

Dave's Garage

Dave's Garage

Күн бұрын

Episode 02: To find the FASTEST computer language retired Microsoft engineer Dave Plummer takes you on a guided tour of 45 different computer languages and drag races each against one another using a prime sieve benchmark in this multi-episode series. From Ada to Zig and everything in between, find out which is fastest and which is slowest as languages are revealed and added to the leaderboard each episode.
What's the FASTEST Computer Language? In order to find out, Dave puts each language through its paces running a prime sieve crafted specially for this purpose uniquely in each language. 45 languages are tested in total, and this is Round 2 in the series.
Languages tested in the series include ARM ASM, X86 ASM, Ada, BASIC, Bash, C, C++, C#, D, Dart, Delphi, F#, Fortran, Go, Haskel, Java, Julia, Lisp, Lua, Node, Nim, OCaml, Octave, PHP, Pascal, Perl, Powershell, Python, R, Ruby, Rust, Scala, SQL, Swift, TypeScript, V, Zig, and more are being added!
Each round, languages are tested in groups, such as C vs C++ vs Rust, Python vs BASIC, Ada vs Pascal vs Delphi, and so on.
Github Code: github.com/PlummersSoftwareLL...
The Shirt (static blue): amzn.to/2VnFuzF
Episode List:
E00: • E00: Software Drag Rac...
E01: • E01: What is the FASTE...
Footage of mob with pitchforks, etc:
APA. Whale, J. (1931). Frankenstein. Universal Pictures.

Пікірлер: 784
@KevinCook-tr9yq
@KevinCook-tr9yq 2 жыл бұрын
The amazing color changing shirt.
@DavesGarage
@DavesGarage 2 жыл бұрын
Someone noticed in the livestream premiere first, but you're the first to comment on it. Good catch! I bet a lot of folks didn't even notice!
@Fidelity_Investments
@Fidelity_Investments 2 жыл бұрын
Was going to comment on that but apparently it's pinned.
@Fiddlesticks86
@Fiddlesticks86 2 жыл бұрын
@@Fidelity_Investments Same 😂
@MDwyer-gh7ok
@MDwyer-gh7ok 2 жыл бұрын
Thanks for commenting on that, I though I was going to have to go to the Doctor and get my eyes/brain checked. So relieved.
@EricFontenot
@EricFontenot 2 жыл бұрын
Hypercolor or post processing?
@lohphat
@lohphat 2 жыл бұрын
I won’t be impressed until the Perl code is on a single line with no comments.
@andsandzandsz
@andsandzandsz 2 жыл бұрын
*unless
@ShaLun42
@ShaLun42 2 жыл бұрын
And without alphanumeric characters
@torstengang5521
@torstengang5521 2 жыл бұрын
@lohphat as it was always intended
@Futt.Buckerson
@Futt.Buckerson 2 жыл бұрын
Love these videos. It's really cool to see someone with this much experience talking about programming
@lucyfrye5365
@lucyfrye5365 2 жыл бұрын
Everybody knows French is the fastest language with Italian a close second. Ever hear a Frenchman speak slowly? Exactly!
@smidi4711
@smidi4711 2 жыл бұрын
fair enough
@thomasa.243
@thomasa.243 2 жыл бұрын
I have heard that Chinese and German are also very fast. But I am not an expert in them 🙈
@mactalk2871
@mactalk2871 2 жыл бұрын
Well I speak french and a little bit Italian and also a little bit Spanish, and I think Spanish is way faster than anything else I have heard
@vicente136
@vicente136 2 жыл бұрын
Brazilian Portuguese is a hard one too
@enzosimone1883
@enzosimone1883 2 жыл бұрын
French MUST be fast in speaking! You know how they say '90'? We Italians at least do not mix grammar and math! :-O
@IanJohnstonblog
@IanJohnstonblog 2 жыл бұрын
You always hit me right in the feels with the Friendly Giant outro. Love this series, and find the comparisons of all the languages fascinating.
@DavesGarage
@DavesGarage 2 жыл бұрын
Thanks! I persist with the Friendly Giant even though about 95% of the global audience, esp. the USA, has no idea what it's about! But i figure it's worth it for that tiny slice of GenX Canadians....
@Davemte34108
@Davemte34108 2 жыл бұрын
@@DavesGarage I am old enough to remember "The Friendly Giant" on TV in the USA. Thank you.
@VincentJGoh
@VincentJGoh 2 жыл бұрын
Look up. Waaaaaaay up
@nlbutts1
@nlbutts1 2 жыл бұрын
Thanks for doing this series. I'm leaning and it's entertaining. Thank you.
@Ch40zz
@Ch40zz 2 жыл бұрын
Please show the "current" leaderboard of all previously raced languages. I know that the videos are not really ordered but they DO have episode numbers after all :)
@DavesGarage
@DavesGarage 2 жыл бұрын
Fair enough! I'm going to bust out a whiteboard and camera and do it Top Gear style, since this is racing and all. I just need a mini stig... wish I had an Intel bunny doll!
@Ch40zz
@Ch40zz 2 жыл бұрын
@@DavesGarage Awesome, Thanks a lot!
@jono77seven
@jono77seven 2 жыл бұрын
@@DavesGarage Stack XD
@kdawg3484
@kdawg3484 2 жыл бұрын
This is fascinating. I only have a few years of basic programming classes from 20 years ago notched on my belt, but it's enough to pick up the interesting differences by immersion here. I suspect by the time this series finishes, I may just have some inspiration to go try a few of these languages out and get back on that train.
@HeavyD6600
@HeavyD6600 2 жыл бұрын
Great video as always, Dave! Thanks, a fellow Canadian!
@connorm9176
@connorm9176 2 жыл бұрын
I think that C and Zig should be in the same episode since Zig is often called 'better C' by its community and creators
@steve_weinrich
@steve_weinrich 2 жыл бұрын
Interesting video, but a few observations: 1) Machine language and assembler are the same thing. Assembler assigns a mnemonic to each machine instruction. It is a one-to-one relationship. It is simply a way to code in "letters" rather than "numbers" and was invented for that exact reason. All other languages use a one-to-many relationship. A C statement like "++a;" could translate into an "LOAD, INC, STORE" operation (far from the only possible implementation). 2) In a compiled language, the specific compiler, version, and optimization capabilities (and settings) can have a huge effect on performance. Further, the specific instruction set of the target machine can also have a huge effect. In the old days when compilers were only available from the hardware suppliers, it was very common for the compiler to take advantage of specific instruction unique to the hardware. A very old example was that on the IBM 360, there were native BCD instructions! I can remember when PC chips did not come with floating point operations (Intel 286 and 386). There are currently machines (and video cards) that can be programmed to use vector operations over arrays. The "look ahead" and caching capabilities of various processors differ dramatically. In an interpreted language, many comparisons are invalid because it is not the language that is being compared, but the implementation of the internal run-time library. A Perl implementation on one machine is not required to run identically to another machine, only to produce the same results. I remember using APL and the performance results of various operations were very different on different machines due to the differences in implementation. The short version of this is that tests can yield different results using different hardware/software/settings. Any comparison is limited to a very precise and unvarying specification! 3) IBM 360 JCL has no mechanism for looping, computation, or any other programming task. It only has the ability to test the "return" value of the previous operation (EXEC). It is possible that these capabilities were added in later machines and/or OS's, but I have no experience with them. Keep up the good work!
@RetroTechChris
@RetroTechChris 2 жыл бұрын
Great stuff! Dave, your videos have always been AWESOME and they keep getting even funnier and better. You are the man! Absolutely loving the computer language wars series :-)
@DavesGarage
@DavesGarage 2 жыл бұрын
I appreciate that! Thanks for reaching out to let me know!
@brucewilliams6292
@brucewilliams6292 2 жыл бұрын
The intros get better every time!!! Thanks!
@omojjegomosc8211
@omojjegomosc8211 3 ай бұрын
This series is great!!
@PorscheRacer14
@PorscheRacer14 2 жыл бұрын
As a fellow Saskatchewan kid that started on a Magnavox Odyssey II and wrote my first stuff on a Coleco ADAM (with my mom), it's always sea-quall to me, haha. This is a fun series!
@mikek3094
@mikek3094 2 жыл бұрын
Maybe group data analysis/science languages together, like Python, R, Julia, and Matlab
@billowen3285
@billowen3285 2 жыл бұрын
Python is general purpose, it just happens to be good for data analysis/science
@AtriumComplex
@AtriumComplex 2 жыл бұрын
It might be fun to put Cython in this group instead of Python since Cython is the backbone of several major Python data analysis packages (pandas, scipy, scikit-learn).
@DavesGarage
@DavesGarage 2 жыл бұрын
Good idea. Even though I've already done Python, I could include it but allow a numeric library, at least as an exhibition run to demonstrate what's possible!
@JohnMichaelCagle12
@JohnMichaelCagle12 2 жыл бұрын
@@DavesGarage That would be cool. Thanks for the content!
@jonathanreiter2852
@jonathanreiter2852 2 жыл бұрын
Add in SAS, Octave, SPSS, and FORTRAN and you're on the right path.
@markstrickland438
@markstrickland438 2 жыл бұрын
Awesome series,Dave! I look forward to seeing you do some 6502 stuff even more. Throwing in some 65c816 would be the icing on the cake!
@antibrevity
@antibrevity 2 жыл бұрын
This is a great series and I love seeing the algorithm in different languages. I recommend that the oddball languages be clumped into "miscellaneous" episodes as necessary. Instead of comparing similarities, you can give a quick assessment of what each language is used for. The results won't be very relevant to one another, but it will still be interesting to see what speeds are typical for that language's particular job. We should still try to associate languages with "similar" jobs or which run in similar environments, of course, but that may not always be possible and I would want to include 3 languages per episode when practical. Group up the obvious contenders and then start trying to clump the rest into "close-enough" associations. I also suggest that groupings larger than 2-3 can be allowed by carrying results over from one episode into the next. A follow-up episode can refer back to the prior languages and simply continue on from where the prior one left off. This would create larger groups of 4-6 than span 2 episodes, but no more than that.
@melvinkemp8769
@melvinkemp8769 2 жыл бұрын
Thanks for this!!!
@MrZendor
@MrZendor Жыл бұрын
That ending. Of course you went there. Well done. Waiting Gerome in the next episode. Or possibly Hammy the Hamster cameo in the diving bell.
@SteveBrecht
@SteveBrecht 2 жыл бұрын
As a Canuck of a similar generation to yourself, Dave, the ending was perfect.
@laxr5rs
@laxr5rs 2 жыл бұрын
Thank you again, so much! Great video. I'm a release engineer and can do some Bash, and Perl, and the like, but I'm not a pro coder. Even though, this series is fascinating to watch.
@DavesGarage
@DavesGarage 2 жыл бұрын
Great to hear!
@MichaelEhling
@MichaelEhling 2 жыл бұрын
9:33 "...raison d'être..." pronounced well. Canadian cred checks out.
@jeremiefaucher-goulet3365
@jeremiefaucher-goulet3365 2 жыл бұрын
Seems like you're having more and more fun editing your videos with all those tricks and effects ;)
@DavesGarage
@DavesGarage 2 жыл бұрын
I try... it keeps things entertaining for me as well. But wow, there's a lot of time into edits!
@minijimi
@minijimi 2 жыл бұрын
Love this series.
@DavesGarage
@DavesGarage 2 жыл бұрын
Thanks for letting me know!
@hugoporras3162
@hugoporras3162 2 жыл бұрын
I've been waiting for this :)
@AdrianBoyko
@AdrianBoyko 2 жыл бұрын
Ah, the good old days of three TV channels! I grew up in Alberta but spent a lot of time visiting relatives in Prince Albert and Saskatoon.
@Afif87123
@Afif87123 2 жыл бұрын
Python: print("Hello World") Java: hey, would you mind to make some classes first? :)
@ChristopherGray00
@ChristopherGray00 2 жыл бұрын
just because it requires a class doesn't mean it's bad, it needs to know where to start, you can also write a python program without functions and most languages won't compile that, so what?
@Anllazsn
@Anllazsn 2 жыл бұрын
But who prints faster? I bet on java.
@MrChickenpoulet
@MrChickenpoulet 2 жыл бұрын
@@ChristopherGray00 don’t take it too seriously ;)
@michaelingley3703
@michaelingley3703 2 жыл бұрын
@@Anllazsn who cares? They are really slow.
@ZephrymWOW
@ZephrymWOW 2 жыл бұрын
Python: "Calls 500 lines of C code as a wrapper" WoWL0oKHoWE45yPy7h0nIz
@TheoWerewolf
@TheoWerewolf 2 жыл бұрын
It also has to be noted that when modern CPUs there are some really weird branch optimisations that include things like knowing how long the branches are to decide which is the best optimisation... and that's HARD for a human coder to do.... So *technically*, yes, a really, really good asm coder could match the best compiler... but that's only technically correct, admittedly, the best kind of correct.
@stephanweinberger
@stephanweinberger 2 жыл бұрын
btw. the most expensive operation in the Perl implementation is actually initializing the 'bits' array. It takes about 30% of the overall runtime! So using a more suitable bitarray class (of which there seem to be plenty on CPAN) should speed things up significantly.
@yuvalyeru
@yuvalyeru 2 жыл бұрын
Great video as always Dave! BTW the wackiest part of PHP IMHO is the comparison rules, where null, 0, false, and "0" are almost the same thing. Ohh, and the $$var thing...
@nalixl
@nalixl 2 жыл бұрын
The $ thing might seem whacky, but i find it a hell of an improvement in readability. You know in the blink of an eye wether or not you're dealing with a variable.
@airfixer9461
@airfixer9461 2 жыл бұрын
Great video Dave, funny & informative :-)
@DavesGarage
@DavesGarage 2 жыл бұрын
Glad you enjoyed it!
@lukepurse9042
@lukepurse9042 2 жыл бұрын
Thanks for your humour and humility, Dave. You're managing the sweaty geeks with class.
@rudyatgmail7839
@rudyatgmail7839 2 жыл бұрын
Thanks Dave. I made my living working with technology geeks, trying to understand and convert their knowledge into something mere mortals could understand. I had my share of fakers, trying to snow me with complex combinations of new words and concepts, poorly explained. I remember one session where I was told, "Our technology assumes some intelligence on the part of the user". On the other hand I thoroughly enjoyed working with true experts, those who where comfortable in their knowledge and were eager to share it with others. They explained using metaphors and simple stories, boiling their vast knowledge down to the essence that would reveal the beauty of their craft. They were always eager to share and they loved making new discoveries of their own. Your videos remind me of these session. Challenging but fun, I always up for the ride to the technology discovery store, knowing we're going to get something good. Growing up the 1970s watching drag racing in Fremont and working on cars at Bill's Arco, I appreciate your combined love of cars and computers. What a great time to grow up. Thanks for sharing!
@DFPercush
@DFPercush 2 жыл бұрын
There's a saying: If you can't explain something simply, you probably don't understand it.
@DavesGarage
@DavesGarage 2 жыл бұрын
Thanks kindly! Glad you're finding them enjoyable!
@DavesGarage
@DavesGarage 2 жыл бұрын
That was Einstein's quote, I believe: "If you can't explain it simply, you don't understand it well enough."
@supercheetah778
@supercheetah778 2 жыл бұрын
Just an idea for the future: Language "performance" in terms of productivity, readability, safety, and expressiveness. I think it would be be interesting to explore the maintainability of a project in some languages, its readability for newcomers to a project, their ability to help mitigate or even eliminate some classes of bugs, and the ability of just how quickly or easy it is to go from idea to code, even if it's just a proof of concept.
@spikeevans1488
@spikeevans1488 2 жыл бұрын
perl is, in my opinion, a write-only-language. I have written perl that six months later I had no idea how it worked.
@petraomenova2634
@petraomenova2634 2 жыл бұрын
Myth
@stephanweinberger
@stephanweinberger 2 жыл бұрын
That depends very much on how you code :-) I've been coding in Perl for 20 years now and find I have no more problems reading my old code than in any other language. But I agree that Perl *can* be quite messy because almost everything can be done in several different ways - you need more discipline to keep it clean than in other, more restrictive languages. If you look ath the implementation here it pretty much looks exactly like the PHP implementation, apart from the postfix notation of if/unless and the explicit fetching of function arguments.
@nonconsensualopinion
@nonconsensualopinion 2 жыл бұрын
Perl is the only language that looks the same before and after being encrypted.
@casperes0912
@casperes0912 2 жыл бұрын
Interesting metrics to look at for the final runtrhoguh Code size relative to performance. Perceived complexity relative to performance And a huge performance comparison matrix comparing languages compiled for and run on Windows, Linux and macOS with different compilers where available, to let C not just be represented by GCC but also Clang, MSVC and other optimising compilers potentially
@UMNstevenelson
@UMNstevenelson Жыл бұрын
I like your shirt! The drag racing is cool too!
@alexandrohdez3982
@alexandrohdez3982 2 жыл бұрын
Love your videos 👏👏👏
@DavesGarage
@DavesGarage 2 жыл бұрын
So glad!
@verygooddog3080
@verygooddog3080 2 жыл бұрын
for languages like postscript and sql, a grouping of outliers could demonstrate interesting methods of getting them to work as a sieve (i for one am curious about sql) and show off how clever the solutions are
@jgostling
@jgostling 2 жыл бұрын
I'm curious about whether SQL would be testing the language or the DB engine on which you run it.
@mkelly0x20
@mkelly0x20 2 жыл бұрын
Thanks, this was not the result I expected, at least not based on my own biases. I almost want to see if I can make the perl code better, but I haven't really done much in perl or PHP in quite a while now, and as you called out at the end, most of what I did was never super performance sensitive.
@chaoslab
@chaoslab 2 жыл бұрын
Always a good day when there is a new Dave's Garage video is posted. :D
@DavesGarage
@DavesGarage 2 жыл бұрын
Enjoy! Thanks for the kind words!
@Wolfram69756D
@Wolfram69756D 2 жыл бұрын
I think I missed the episode where they reveal who shot JR. Certainly, I won't miss the winner of this drag race! :D
@katiedonovanAlt
@katiedonovanAlt 2 жыл бұрын
7:00 Fun bit o' trivia: While everyone was wondering who shot J.R., scientists discovered that two of Saturn's' rings are woven together through forces unknown. I learned that from Harlan Ellison, some time ago.
@Songfugel
@Songfugel 2 жыл бұрын
19:31
@justtesting555
@justtesting555 2 жыл бұрын
Dave I have always been curious about this... can you do a video on why ctrl-alt-del was used for logging in?
@IcenPower
@IcenPower 2 жыл бұрын
That's because it is one of the only keyboard combo'es you can't interfere with. If you could reassign it, you would be able to spin up a fake login screen and intercept the credentials... which i vaguely remember somebody doing for the local Novell Netware login, in my early educational days. Ediit: Also ctrl-alt-del has, as far as i know, always been the keyboard combo for soft-reset on PC, so it was uninterceptible and guaranteed to be available.
@pomchan4704
@pomchan4704 2 жыл бұрын
Great video Dave! I use perl alot. Its not fast, but its dependable.
@TAP7a
@TAP7a 2 жыл бұрын
“Sport-ah-zh”, “sequel” and “N-aye-k” are wonderful and never ever change them
@DavesGarage
@DavesGarage 2 жыл бұрын
I'm not TOTALLY sure but I'd wager Kia Sportage comes from the French "portage", which is to carry a canoe overland. I always found it odd that we had and kept our own pronunciations for things, but it happens elsewhere too. One thing I always found odd is Andrew Carnegie's name. It's pronounced CAR-NAY-GEE but they say "KARN-AGEE HALL" for the building!
@Sibula
@Sibula 2 жыл бұрын
Wait... How are you supposed to pronounce Nike then?
@TAP7a
@TAP7a 2 жыл бұрын
@@DavesGarage to be honest, I always pronounced it exactly the same for exactly that reason. It's so much smoother! As for Carnegie, that feels like a whole kettle of fish...
@asdasdv7540
@asdasdv7540 2 жыл бұрын
@@Sibula nigh key
@Sibula
@Sibula 2 жыл бұрын
@@asdasdv7540 huh, that sounds really weird...
@PaulDubs
@PaulDubs 2 жыл бұрын
It would be fun to see (and listen to an explanation of) array oriented languages like APL, K and J. Given that there are sometimes claims that K programs can be faster than hand optimized C, seeing how well it does here would be really interesting.
@ddbonpc
@ddbonpc 2 жыл бұрын
Thanks for showing the PHP I wrote, awesome challenge !
@DavesGarage
@DavesGarage 2 жыл бұрын
Thanks again for contributing it!
@exactspace
@exactspace 2 жыл бұрын
Perl is great. I used it for an Objective-C build phase to edit XML files with regular expressions.
@MythiPlayz
@MythiPlayz 2 жыл бұрын
That thumbnail brightned my day ❤️
@DavesGarage
@DavesGarage 2 жыл бұрын
Thanks! And while it looks fairly clickbaity, its an actual scene from this episode!
@TheJanhalsema1
@TheJanhalsema1 2 жыл бұрын
I love this project, I massivly enjoyed working on the Zig version with ityonemo. I worked on the faithfull version, I hope to score high with that :-). I enjoy seeing other languages and people being passionate about them 😊
@DavesGarage
@DavesGarage 2 жыл бұрын
Please do! I was very impressed by the Zig work in the project, and I think people will stand to learn a lot from your contributions. And as you know, Zig has been very competitive for performance!
@TheJanhalsema1
@TheJanhalsema1 2 жыл бұрын
​@@DavesGarage They way you described faithfull here is not completely in line with the zig implementation yet. It does know it's size at compiletime and is therefore able to optimize it quite extensively. (just putting the entire sieve on the stack lol). If I have time next week I'll see if I can make it completly faithfull. It's been interesting to see how much the target architecture prefers one solution over the other. eg: My desktop ryzen 3700x is fastest on the version that uses one byte per bit because it has such an absurd amount of cache and is able to keep the entire sieve in there. It actually loses a lot of performance in the faithfull bitpacked version because of the extra bit packing/unpacking it has to do. Meanwhile that version is by far the fastest implementation on my raspberry pi that has very little cache causing massive amounts of cache misses in anything but the bit packed version.
@freezombie
@freezombie 2 жыл бұрын
Having spent quite a few hours trying a failing to beat you in Fortran I have to say I believe in you :-)
@mike-barber
@mike-barber 2 жыл бұрын
I also really like your Zig solution. It's a pretty cool language!
@r00tyschannel52
@r00tyschannel52 2 жыл бұрын
Honestly not surprised about the perl result. It's absolutely my go to language if I want to do something quickly under linux that I'll either use once, or isn't too intensive. It can do a lot of things way easier than other languages I think. SQL access (including prepared statements), excellent regex capability, good file read/write options and overall filesystem control, rest/json client easily implemented. If you just want to bring things together quickly it's excellent for that. But, it's not fast. If I know I need speed I'll generally go for C# (via mono for linux). There's also the danger something you thought would be simple is started in perl and then becomes some monstrosity you wish you'd moved to something else long ago.
@dangenson8525
@dangenson8525 2 жыл бұрын
"Who shot JR" now there's a reference that probably lost most of the audience under 40, well played
@DavesGarage
@DavesGarage 2 жыл бұрын
I always wonder about that stuff! I mean GenX and older will get it, but it probably does right past everyone else!
@nebulium6641
@nebulium6641 2 жыл бұрын
@@DavesGarage Gen z here, No clue what it means haha
@dannyclifford7874
@dannyclifford7874 2 жыл бұрын
@@DavesGarage Well it made me laugh and I'm in depression over the footy result last night !
@brock2k1
@brock2k1 2 жыл бұрын
@@DavesGarage We'll always have Paris.
@stanrogers5613
@stanrogers5613 2 жыл бұрын
@@nebulium6641 "Dallas" was the "Game of Thrones" of its day - even if you didn't like it or had absolutely zero interest in it, you couldn't follow what anyone was saying if you didn't have a few of the key references front and centre (yes, "centre", for all you u-dropping, re-reversing rebels out there) in your brain.
@dragonwisard
@dragonwisard 2 жыл бұрын
I would like to see the concatenative/stack-oriented programming languages (PostScript, Forth, Joy, Factor) featured together. Looking at the Github, there aren't implementations yet for Joy or Factor, which are two languages that I've been curious about. Perhaps I can learn enough about one or both to contribute a faithful implementation. Either way, Forth and PostScript would be an interesting pairing, even though they look very different and are typically used in very different contexts. One thing they share in common is that they were originally designed to run on memory-constrained systems.
@willd4686
@willd4686 2 жыл бұрын
Really hope someone has implemented it in Haskell, I'm trying to learn the language but it's fairly different and it hasn't been my top priority. Maybe this is the perfect scale or project to get me started!
@John-uc6gb
@John-uc6gb Жыл бұрын
Still very cool video. Among the other languages I also learned JAVA, JAVA Script, HTML, and SQL.
@polmarcetsarda
@polmarcetsarda 2 жыл бұрын
Once my C++ changes are merged, you bet it's going to be on the top!
@DavesGarage
@DavesGarage 2 жыл бұрын
Challenge! I plan to tinker soon with C++ and x64 ASM versions!
@polmarcetsarda
@polmarcetsarda 2 жыл бұрын
@@DavesGarage great! If you find improvements in my suggestions I'll just take my hat off. Have a great day Dave :D
@chrisred87
@chrisred87 2 жыл бұрын
I can't even imagine what a JCL Prime Sieve would look like. I've only ever used it to move/sort datasets and call Programs. If it's possible I'd love to see it!
@richardmeyer418
@richardmeyer418 Жыл бұрын
Not to be too controversial here - I seriously doubt that it can be done in JCL (whether MVS or VSE version). They were really just a way to control the flow of programs as in "run the SORT program with these two files as input, using these parameters to control the sort (ascending, descending, type of data, etc) and putting the output in that file". If anyone actually works out a way to do it, I will be seriously impressed, nay, flabbergasted.
@GeorgeKamps
@GeorgeKamps 2 жыл бұрын
Saturday July 3 2020? Off by one error on the year? :) Thanks for this series. I ran it on my home machine and it was a lot of fun.
@RobShinn
@RobShinn 8 ай бұрын
Many C compilers, including gcc, the Intel C compiler, and the Sun C compiler (on Solaris), actually compile to assembler. That might also be true of Visual C++, but I'm not sure since it's been awhile since I've used that toolchain.
@DukePaprikar
@DukePaprikar 2 жыл бұрын
Keep it up, Dave! You can do it! You can overtake "Discount Bus Passes for War Widows" for that #1 spot on Github.
@augustuscrocker9328
@augustuscrocker9328 2 жыл бұрын
Dave this is great. I think your pithy rebuttal to the "assembler is fastest" argument was first-rate. I'm with you --- if someone is able to code the prime sieve (including I/O) directly in machine code, they deserve special recognition --- perhaps an all-expenses paid houseboat tour of Lake Wascana ??
@DavesGarage
@DavesGarage 2 жыл бұрын
Yes! You could take them and show them the old bandstand!
@aaron41
@aaron41 2 жыл бұрын
"I apologize in advance" Canadian confirmed xD
@BartekJuszczak
@BartekJuszczak 2 жыл бұрын
I can't find the results :/ it would be soo competitive if the latests ran results of all languages where available to see! Serious motivation to improve an implementation. Great series!
@mrandersson2009
@mrandersson2009 2 жыл бұрын
For any compiled languages it would be interesting to compare different compilers with all possible and imaginary optimizations turned on.
@stephanerichard3979
@stephanerichard3979 2 жыл бұрын
Awesome so far. where do you put that sql and postgres? simple in a business intelligence part :)
@DefekCs
@DefekCs 2 жыл бұрын
Thanks, Dave for this series. It is very interesting! :) But there is one thing I would like to point out as loud as possible, but... well, this is as loud as it will ever get! :D LANGUAGE SPEED DOES MATTER MORE THAN ONE THINKS! Dave stated that: "[..] language is good as long as You get from it what You want without waiting on it to do its job [..]". It is subjectively a valid, yet globally broken logic that will (and actually invisibly is already) kicking our rear ends. Reality is displayed with PHP as an sad example. Most web pages in the world is running PHP back end that is written by many people that took their time to learn this specific language. Many poor in their time, energy and effort to make it better. Good job, but ... it is like reinventing the bike all over again. I am definitely NOT stating that PHP is bad. What I am saying that people all around the world is investing into worse performance-wise language than they should. It matters when You take this exact comparison into account - speed - and combine it with scale! If task given is equal & HW is fixed, why language matters? Energy consumption. Electricity. We are talking hundreds of megawats per hour of electricity consumption difference in single country! If PHP is 4 to 8 times slower than (for example) C, C++ or any other language that can do the same job, it is economically unjustified to use slower language for big projects that are run countless times all over the world even if programmer salaries are taken into account. And big projects are the ones driving language development itself! So, reason that "one language is easier to use than other in given task" also becomes meaningless at the point where You still have to learn & develop a language itself. It, unfortunately, looks like that most popular languages are the ones that lets You be sloppy the most. Not most efficient or fastest to write, but the ones that requires less attention, less care and makes someone or something else to cover up programmers laziness in some other means, like... lets just buy bigger server and burn twice as much energy to run this homepage... I am not advocating for C or Assembly as "be all & end all" for everything! I am just saying that there has to be a point where programmers have to be able to put down their opinions about how good or bad language is, and realize, how big of an impact given system will have on global scale. Big impact & big scale? Reconsider the choice of language not for ease but for function.
@DerekWitt
@DerekWitt 2 жыл бұрын
How about something as obscure as Standard ML? The computer languages course I took at college involved that language. It’s not very useful for writing applications, but was originally intended for mathematical proofs. This would be an interesting language to try.
@siberx4
@siberx4 2 жыл бұрын
Perl's "unless" keyword is an interesting option, and in the right place (maybe 10% of conditionals in my experience) is actually very helpful for clarity. The problem is that (like most of the language) it suffers from over-application by enthusiastic programmers who just discovered it (nested cases, "unless" combined with not operators, etc...), and insufficient sober analysis about whether it actually improves code clarity in each case. Perl as a language gives you a huge footgun to write things incomprehensibly, but also allows for very clear and expressive solutions with some forethought. I mostly work in Python these days, but one thing I really miss from Perl is its variable scoping rules. It's easy and straightforward to scope variables to the specific pieces of code you want, ensuring they're available exactly where needed without trampling on anything else. The other big thing I miss is Perl's use of regular expressions as a first-class citizen, baked right into the language. There's a way to use regular expressions in just about any language, but they're a powerful (and like perl itself, often abused) tool that takes a lot more boilerplate to leverage in just about anything other than Perl.
@robsku1
@robsku1 Жыл бұрын
Indeed, Perl's RegEx support is out of this world - not only is it baked into Perl's syntax, it also goes way beyond regular "Extended Regular Expressions" (as GNU Grep likes to call what's usually meant by regexps). Even without rest of the Perl it's so powerful that GNU Grep has separate command line switches -E (for "Extended Regular Expressions") and -P (for "Perl Regular Expressions"), LOL - but the things you can do with it inside perl code... Yet way too often I see regular expressions used in Perl code when they aren't needed, like where plain globs would be enough (and easier to write, faster to perform, etc.). One other language I was originally gladly surprised to see getting regex support, also baked into it's syntax, was bash - but being baked into syntax doesn't mean it's necessarily that awesome... However the alternative is to call another tool that has regexp support, and depending what you need from it you'll have to use different commands - of course when I first tried it (and almost every time since), I was hit with the most common flaw of bash: unclear documentation. What I mean by that? Well, technically the documentation isn't ridden with errors, it's just that it's not telling you everything you need - like the part where when you have a conditional using = or !=, the right part can be used for glob pattern matching - what it leaves out is that if you have the glob pattern in variable and put the variable in quotes, it doesn't work. Actually it's not about using variable, I found this out when I was trying to do "if [[ ("$1" = "-*") && ("$1") != "--")]]; then..." and couldn't get it to work. You can say that glob matching does not work with quoted strings, but the man page didn't. It might mention it in another place, and obviously when you write "*" on command line it's not expanded to list of files, but pattern matching inside conditional expression isn't same as pattern expansion. Same kind of issues, but less obvious than that, is what I ran into with bash regexps - and while I've gotten it to work couple times, I usually don't even try, unless I have a good reason. And bash has a lot of unexplained quirks like that. The biggest issue I have, and I admit I haven't checked the info documentation of bash that does have some things explained better or with examples that work, but the man page doesn't really tell you what regexp functionalities you can use, and I don't really like having to guess whether I need to escape something in some special way, etc. - it's a lot of trial and error, and bash has a number of things you just have to experience and find a way to make it work. I've been in a situation where I first implemented something on command line - a complex one-liner using fortune piped to cowsay with randomly selected .cow file to use - and when I got it to work I tried to use it inside a function. I never figured out that one, but it just didn't work. I wanted it in my .bashrc, but I wanted it as shell function I could also call manually anytime I wanted to, but somehow the same line inside a function spewed out some error I've since forgotten. But most of the time I still love bash - but I'm really reluctant to try and use it's regexp functionality. I've never liked awk or sed, and if I were to call perl I feel I could just as well do the whole thing as perl script instead. I don't know why I felt like making this rant - at first I just wanted to say that bash also has regexp support as part of it's syntax, but that it's not that good (or perhaps it would be if not for the lack of good decumentation), but it grew into large rant about bash documentation in general and in relation to regexp support. Funny thing - I once found a fork of OG bourne shell and now always install it on every linux installation I do for myself; because I like to. But while it's much more limited and simpler to document, it's documentation is stellar in clarity when compared to bash. In fact it's so good, that even when making bash scripts if I need to refer the manual and if it's about something that works with bourne shell, I'll rather check it from bourne shell man page ;)
@VSLComputers
@VSLComputers 2 жыл бұрын
Very entertaining...
@pleggli
@pleggli 2 жыл бұрын
It's not always certain that languages don't compile to intermediate languages. Typescript compiles to java script because it runs in the browser. The haskell compiler (GHC) used to compile to C code as an intermediate step. I am sure that there has been a lot of C compilers that has done this too including Dennis Ritchies original [C compiler] --> [assembler] -> [linker] build chain.
@Carhugar1
@Carhugar1 2 жыл бұрын
We are gonna need a playlist soon :)
@buxeessingh2571
@buxeessingh2571 2 жыл бұрын
One thing I would like to do at the end to group languages in different groups for comparison.
@pm71241
@pm71241 2 жыл бұрын
Having coded a lot of Perl ... I think that today it's not really suited for applications. But it's still very practical for exactly what it was meant for originally: "Practical Extraction and Report Language". I still use Perl when Bash error handling becomes too risky for me. But all application stuff I write in C, Go or rust.
@Qrzychu92
@Qrzychu92 2 жыл бұрын
hi, great vid as always :) one question: is writing to console measured or just the calculation? I did exactly that experiment some time ago (inspired by your video of course :)) with C# and Rust, and the biggest difference was in writing the nubmers to console.
@DavesGarage
@DavesGarage 2 жыл бұрын
You don't want to be outputting the numbers to the console while testing, just keep track and return the results to a function which then prints them at its leisure, outside the timing loop.
@Qrzychu92
@Qrzychu92 2 жыл бұрын
@@DavesGarage that's what I did, and the results were surprisingly close between the two (Rust was 2x times faster). Thanks for the response :)
@ericpa06
@ericpa06 2 жыл бұрын
Sorry it hasn't that much to do with the current video, but could you make a vídeo about windows 11? What is your take on it? And more precisely talking about the challenges on bringing dark mode to legacy win32 software, such as the task manager?
@piratk
@piratk 2 жыл бұрын
This may be over kill, but the target/host may actually influence the results
@SimonBuchanNz
@SimonBuchanNz 2 жыл бұрын
For this test, where it's single threaded and basically entirely CPU, it really shouldn't. It can definitely be an issue with threaded code even on the same architecture though, which can be surprising!
@piratk
@piratk 2 жыл бұрын
@@SimonBuchanNz On a rich induction set, some of these code sections may be accelerated. In particular, the bit banging parts, there may even be a bit fill with offset instructions available.
@SimonBuchanNz
@SimonBuchanNz 2 жыл бұрын
@@piratk yeah, should have been clearer that I just meant the OS, absolutely you could get different results on different architectures.
@kc9scott
@kc9scott 2 жыл бұрын
And the quality of one compiler/interpreter implementation vs. another within each language.
@mytech6779
@mytech6779 2 жыл бұрын
I would guess this is covered but did you turn off CPU auto scaling in the firmware? If you have a turbo boost or energy saving mode the frequency will bounce around. Just the slight lag of waking up from low freq could skew the results. Sometimes there is also a high perf compute mode, it just keeps the CPU and buses all at a constant high freequency
@JamesJones-zt2yx
@JamesJones-zt2yx 2 жыл бұрын
I think the "no country for old programmers" is the more obscure reference for the people who are following this competition.
@arcticcat74
@arcticcat74 2 жыл бұрын
Love the Friendly Giant!
@Pheidias73
@Pheidias73 2 жыл бұрын
Question. At 12:20 the PHP code on line 64 is using "factor*3" in the for loop. The pearl code though at 17:35 is using "factor * factor" (line 43). I have noticed that both of these are being used by the various implementations of the code. Are both valid within the rules and regulations? Surely factor*factor is going to be quicker if its valid, as it will result in far less loops through that section of code.
@mattbox87
@mattbox87 Жыл бұрын
Yeah it's true enough we can expect a lot out of good assembly and to a lesser extent C, but Dave you're exactly right on why races are still worthy. (P.S. not to mention quantifiable relative performance and Why The Heck Not value like with PHP!) OTOH I think it's a wonderful thing that we have C; I love that it's relatively directly translatable to assembly. But there's no natural reason it should be on the top shelf; why we shouldn't wish for something better?! I'm really enthusiastic about Rust and it's decisions to make life easy as much as possible at compile time. I think soon Rust could reach a point where it's not competing as a Language but battling against specific C compilers. P.S. apparently I'd appreciate Zig :D
@musclesmouse
@musclesmouse 2 жыл бұрын
I have not used Perl since 2002. I used it for pattern matching. Languages are used as tools. I do not know if Perl is fast, but using it to find patterns is faster than using human eyeballs. I originally used Perl and later grep in Linux for file searches.
@stevhutch3835
@stevhutch3835 2 жыл бұрын
Perl is also Practical, for (textual) extraction and reporting, eh? A Perl programmer for 40 years ( after awk wouldn’t satisfy ), it was nice to see some good OOPerl. I grew up in Buffalo, so we could get the 3+ US TV networks and the 3+ Canadian stations from Toronto. I watched a lot of The Friendly Giant.
@OnurBuyukcaglar
@OnurBuyukcaglar 2 жыл бұрын
4:39 off to watch some Amanda McCants reruns. Ahahahaha that my friend made my day.
@melellington1333
@melellington1333 2 жыл бұрын
I suggest a headless category, maybe something like 'GUI' or 'graphical' or simply 'not headless'. Some languages for all practical purposes either can't or don't ordinarily operate in a text based mode . For instance, LiveCode. It's possible to write the Sieve program in a LiveCode "headless" mode, but I doubt that more than 1 or 2 LiveCode programmers out of a 1,000 ever experience writing a headless program in LiveCode. In the majority of commonly used languages, programmers have lots of experience writing programs in a text editor and running them in a 'console' or 'terminal', i.e. in headless mode. However, you can't do that in Scratch - which is higher on the TIOBE list than Rust, Ada, Julia, COBOL, Kotlin, Haskel, Lua, et. al. Going headless in the robotic programming language NXT-G is possible in a variety of headless languages, but I doubt that more than 1% of the Lego Mindstorms programs are headless. Likewise for LabVIEW. Your comparison of dozens of programming languages is woefully biased towards headless language programming. How would you compare the sheer number of computer programs in use today by people throughout the world, which are headless vs. GUI? My guess is that the vast majority of people don't care to be presented with a console/terminal screen when they want to use a computer program. For that reason, I also doubt that most programmers are writing headless programs.
@kylestubblefield3404
@kylestubblefield3404 2 жыл бұрын
I have always found Perl to be orders of magnitude faster than PHP in heads up programming, though I stay away from Perl objects because of the performance hit. To be a valid submission do we have to build it as an OOP?
@jdos2
@jdos2 2 жыл бұрын
Perl's got modules available that use GNU's GMP library (Math::GMP for example) - making for orders-of-magnitude faster execution of many math functions. Would using that module be considered in the spirit of the competition?
@MarkWitucke
@MarkWitucke 5 ай бұрын
Dave, pass me the cards that run the loom to make that shirt pattern. Love it
@xshortguy
@xshortguy 2 жыл бұрын
I love unless in Ruby (and I guess PERL) and I wish more languages had it. Yes, it's just if not, but sometimes that can add a level of mental translation that isn't always natural.
@twobob
@twobob 2 жыл бұрын
This media should reach more people. Be well Dave
@DavesGarage
@DavesGarage 2 жыл бұрын
I sure hope so! If folks share with other PROGRAMMERS that'd really help because it's such a narrow, nerdy interest!
@robsku1
@robsku1 Жыл бұрын
Dave, great episode again - I wrote a comment specifically for you in the end considering your statement of the Perl program being a shell script; I'd love to hear whether you agree and if not, why. No offense meant, never to you - love your content
@paulmichaelfreedman8334
@paulmichaelfreedman8334 2 жыл бұрын
Dave, your narrative could be published in a book, without editing, and still be captivating.
@johnforde7735
@johnforde7735 2 жыл бұрын
Scala and Swift are quite similar, so you could group them. However, Scala is a JVM language and Swift is LLVM. So that's quite different. I'm surprised nobody added a Kotlin version.
@DavidLindes
@DavidLindes 2 жыл бұрын
20:13 - oooh, is PCL Turing Complete? If so, it’s the obvious pairing for PostScript. 😁 If not, maybe PostScript and Logo?!? I mean, pretty different, but…
@FritzElfert
@FritzElfert 2 жыл бұрын
Some remarks/corrections: 15:46: On Unix-like systems, the shebang is NOT interpreted by the shell but by the execve (3) system call. 17:33: $self is NOT a language feature of perl but an ordinary variable. Choosing $self as variable name is a well known convention however. In line 30 of the code, the declaration and assignment of the variable can be seen. Apart from that, awesome project!! Cheers -Fritz
@DavesGarage
@DavesGarage 2 жыл бұрын
Thanks! Fritz's comments look correct to me - that's the risk of talking about things I (admittedly) don't always understand!
@mhagain
@mhagain 2 жыл бұрын
It would be interesting to see a GPGPU implementation, but it definitely wouldn't be an apples-to-apples comparison.
@SoulSukkur
@SoulSukkur 2 жыл бұрын
gpus rely on parallel processing, which violates the "single-thread/core" rule. might be a fun exhibition though
@EwanMarshall
@EwanMarshall 2 жыл бұрын
GPUs running any single thread is slower than most CPUs, the way GPUs accelerate things, is by having hundreds or even thousands of cores to run in parallel. A 3080 breaches the 10,000 mark.
@dutchdykefinger
@dutchdykefinger 2 жыл бұрын
@@EwanMarshall -cores- glorified floating point units i have a hard time really seeing them as cores, that kind of implies a fully functional cpu core for me, shader cores aren't that, it's merely a small subset of what would make a cpu a cpu. back when 386 did not have FPUs yet but you could add one in the board, noone really considered that FPU as adding a core, right? you merely added hardware accelerated extensions. sure a gpu is a very specialized ASIC with hardware accelerated functions for vector and matrix math, but not every floating point units deserves the name of a processor or a core, i regard them more like a single cpu with a shit ton of FPUs running in parallel inside that core. (in fact, one core per pixel in case of a fragment shader, but the same program will be running on each core, until you compile something else for the processor, there is no real thread control there). but yeah, it can do a lot of FP operations in parallel alright i know they call them shader/cuda cores themselves, but meh, marketing fluff to me :D
@EwanMarshall
@EwanMarshall 2 жыл бұрын
@@dutchdykefinger Cuda cores are a bit more than just FP co-processors... There is a a full ALU in them for 32bit integer operations for a start, though everything is SIMD that is split across the cores, I'm not sure on branching and looping constructs. The actual instruction set architecture of CUDA is pretty opaque, that said even hlsl shaders can handle some kinds of looping and branching. I have a feeling that every 32 cores that make up a SIMD instruction would be turing complete in itself. Problem 1 though, you dispatch to add 2 numbers together, well you are also chewing up 31 cores adding 0s together for that clock cycle.
@TomTalley
@TomTalley Жыл бұрын
God I hate "to be continued" ...but this takes me all the way back to the big John and sparkie radio days, buck Rogers, and sky king...but please...don't wait till next Saturday to post the next one. Thanks...this is an example of how the world might be saved ...
E01: What is the FASTEST Computer Language?  45 Languages Tested!
22:28
E03: C# vs Java: Which is Faster?  Computer Language Drag Racing Series
25:10
Сын Расстроился Из-за Новой Стрижки Папы 😂
00:21
Глеб Рандалайнен
Рет қаралды 4,4 МЛН
[실시간] 전철에서 찍힌 기생생물 감염 장면 | 기생수: 더 그레이
00:15
Netflix Korea 넷플릭스 코리아
Рет қаралды 38 МЛН
Scroll Lock - The Secret Key THEY Don't Want You to Press!
9:51
Dave's Garage
Рет қаралды 933 М.
Rust vs 7 Other Languages You Probably Haven't Tried
8:55
Code to the Moon
Рет қаралды 72 М.
45 Computer Languages Compared: Which is FASTEST?
22:27
Dave's Garage
Рет қаралды 164 М.
Everything you SHOULD know about your Computer but don't!
19:59
Dave's Garage
Рет қаралды 437 М.
Linux v Windows: Which is FASTER? - Software Drag Racing!
17:26
Dave's Garage
Рет қаралды 117 М.
Want High Speed Fiber?  Watch this First!
18:52
Dave's Garage
Рет қаралды 298 М.
Почему сканер ставят так не удобно?
0:47
Не шарю!
Рет қаралды 826 М.
С Какой Высоты Разобьётся NOKIA3310 ?!😳
0:43
Vortex Cannon vs Drone
20:44
Mark Rober
Рет қаралды 13 МЛН
План хакера 🤯 #shorts #фильмы
0:59
BruuHub
Рет қаралды 999 М.
Нужен ли робот пылесос?
0:54
Катя и Лайфхаки
Рет қаралды 865 М.