Someone improved my code by 40,832,277,770%
2,360,412
Published 2022-10-17
The improvement was to my code from this video: • Can you find: five five-letter words ...
This is episode 038 of the A Problem Squared podcast which started it all: aproblemsquared.libsyn.com/038-fldxt-in-wordle-and…
Here is Benjamin Paaßen's full grid of all results and techniques used. It also has links to all the code as well. docs.google.com/spreadsheets/d/11sUBkPSEhbGx2K8ah6…
The article by "encody" I mentioned: medium.com/geeklaunch/how-to-speed-up-your-code-22…
This is the reverse-frequency alphabet. Which is frequency in words, not in use (which would allow for frequency of word use; this list counts each word once).
QXJZVFWBKGPMHDCYTLNUROISEA
And whynot, a whole bunch of code. All of it is better than mine. All of it. (Even if you ran it all sequentially.)
Benjamin Paassen [bpaassen]
gitlab.com/bpaassen/five_clique
Sylvester Hesp [oisyn]
github.com/oisyn/parkerwords
Phire [phire]
github.com/phire/five_clique
Neil Coffey [neilcoffey]
github.com/neilcoffey/FunStuff/tree/main/WordleFiv…
Richard Ebeling [He3lixxx]
github.com/He3lixxx/five-words-five-letters
Phillip Alday [palday]
github.com/palday/FiveLetterWorda.jl
Diggory Blake [Diggsey]
github.com/Diggsey/five_words/tree/master
Orson Peters [orlp]
github.com/orlp/matt-parker-five-letter-clique/blo…
Bryan Redd [ae6nr]
github.com/ae6nr/25letters
Pablo Yaggi [pyaggi]
github.com/pyaggi/WordStats
Leonardo Taglialegne [miniBill]
github.com/miniBill/parkerrust
Nathan Baulch [NathanBaulch]
gist.github.com/NathanBaulch/cc26755dc89685fa209bf…
Stefan Pochmann [pochmann]
replit.com/@pochmann/5words538?v=1
Jacob [encody]
github.com/encody/jotto-problem
Gé Weijers [gweijers]
github.com/gweijers/wordle_cover
David A. Dalrymple [davidad]
github.com/davidad/five-letters
Alex Recuenco [recuenco_alex]
github.com/alexrecuenco/five_clique
Kristin Paget [KristinPaget]
github.com/kristinpaget/fivewords
Ilya Nikolaevsky [IlyaNikolaevsky]
github.com/ilyanikolaevsky/five_words
Cheers to my Patreons for helping enable these videos. Without them test running all that code I'd never know how much better an iPad is than me. I'm sure I'll need Patreon help again soon; you can join the team here: www.patreon.com/standupmaths
CORRECTIONS
- Ha, I got the percentage around the wrong way. Should be 40,832,277,770% better.
- Yes, I missed the binary digit for the "A" in "BREAD" and everyone in the live premier chat noticed. Sorry about that. 🍞
- Let me know if you spot any other mistakes!
Filming and editing by Alex Genn-Bash
Some graphics by Benjamin Paaßen
Written and performed by Matt "32 days later" Parker
Music by Howard Carter
Design by Simon Wright and Adam Robinso
All Comments (21)
-
Thank you for proposing the challenge Matt! It's been fun! The solution by Landon and myself referenced at the end truly was an effort that involved everyone else already mentioned in some way. That 500us mentioned (currently at 300us now by the way) has its "DNA" from about 10 different people in it. For me, this was as much of a social exercise as it was a mathematical and programming one. Can't wait for the next challenge!
-
Coder: spends a month writing code to complete a task in a millisecond. Parker: just runs code for a month. Result: a tie!
-
As a programmer, there is nothing more emotionally conflicting than when someone appreciates your code wanting to make it better and then humiliating you by optimizing it to ridiculous proportions
-
The way to get answers on the internet is not to ask for answers, it's to provide the wrong answer and wait for people to correct you.
-
Let's be honest, the record here is that he wrote a program that took 20 days to run. That wasn't easy, not even in Python!
-
I like how this is basically a speedrun category now
-
Seeing the 4,000,000% I immediately thought, "Typical exaggeration. Oh, Stand-Up Maths. It'll be an understatement."
-
It still baffles me that you were alright with it running for a month. I'd let it run for a few hours tops before I gave up or tried to improve it.
-
Python is slow, but not THAT slow. There was a pure-Python solution with about 60 lines of code that took 628 ms, which I was able to reduce down to 121 ms with Numba on an old Core 2 Duo E7500 without parallelization. Usually the bottleneck is the algorithm, not the language used.
-
The smallest length of time that it is possible to run that code in, shall in the future be called Parker Time
-
"You can save days and days of hard work by just spending a few hours reviewing the pre-existing literature" is Matt's way of saying "just read the docs"
-
Watching the cascade from python to java to c++ to c was so satisfying.
-
Matt is a stand up guy. His effort was thoroughly and effortlessly destroyed by a hundred hobbyist and full time coders, and he turned it into a math problem to teach people. Truly a legend
-
Btw, this should be a series. Come up with a problem, solve it inefficently, post it to the channel, and run a speed run competition to see who can do it better. That seems like a fun way to learn programming.
-
Remeber kids: No matter who you are, no matter what you do, there's someone on the internet better than you.
-
This is the craziest Tool Assisted Speedrun progression I've ever seen.
-
I love how I can be in one corner of YouTube where people are taking about computer programming, improving code efficiency just for fun, 30min dives into computing and mathematics… And then I can click away and watch a guy whose entire channel is dedicated to taking the longest bong rips humanly possible. It’s nice, I like this place
-
The moral of the story is: No matter how hard you optimize, you can't get to the answer faster than Matt because he already finished. :)
-
Never underestimate the obsessive compulsiveness of programmers.
-
It's like something my granddad used to say: "It's not about being the smartest, but learning from the smartest to become wiser".