Skip to content
0:00 / 0:00

#wordle#optimization#mattparker

Someone improved my code by 40,832,277,770%

Stand-up Maths

1.3M subscribers • 12 videos on Hallway

YouTube

Beginner. No background in the topic needed.

3M views4 years ago2 recommendations

Computer scienceTools and practiceAlgorithmsPerformance and optimization

Matt Parker explains how community contributors optimized his slow Wordle-solving code to run hundreds of millions of times faster using graph theory.

YES, the improvement should be 40,832,277,770%, not what I say in the video. The "408,322,778" multiple was correct and I did the percentage the wrong way. There will not be a follow-up video to correct that. The improvement was to my code from this video: youtube.com/watch?v=_-AfhLQfb6w This is episode 038 of the A Problem Squared podcast which started it all: aproblemsquared.libsyn.com/038-fldxt-in-wordle-and-improv-ta… 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/11sUBkPSEhbGx2K8ah6WbGV62P8ii… The article by "encody" I mentioned: medium.com/geeklaunch/how-to-speed-up-your-code-224-444-739-… 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/WordleFiveWordFinde… 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/blob/master/s… 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/cc26755dc89685fa209bf958e484c60… 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: 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 ed

Why it's here

2 people recommend this

What people say. Recommended as an entertaining and educational demonstration of algorithmic optimization and performance improvements.

Hail_Spacecakeon Lobsters • Recommends

Someone improved my code by 40,832,277,770%

db48xon Hacker News • Recommends

On “Ask HN: Is there a code golf community but for performance instead of size?”

See also “Someone improved my code by 40,832,277,770%” < link to this video > by Matt Parker. It can be a really fun game!

CRConradon Hacker News • Mentions

On “A Neat XOR Trick”

> 'Drastically' in this context can mean the slower approach taking billions of times longer. Standupmaths - "Someone improved my code by 40,832,277,770%": link to this video (OK, 41 billion percent is only 0.41 billion times better, but still.)

otikikon Hacker News • Mentions

On “A New Formula for the Determinant”

Also keep in mind that there’s people out there that will take your code and make it 40.363.757.265% more efficient (perhaps not in this case) link to this video

high_prieston Hacker News • Mentions

On “Squeeze the hell out of the system you have”

Quick google yields very good examples in huge improvements on a single algorithm level: link to this video Easy to imagine how even smaller improvements across 10-100 steps of data processing, can become even better.

u/FreddyFerdilandin r/compsci • Mentions

On “I Understand Coding Problems but Can’t Implement Them”

how did you go with Towers of Hanoi ? see how recursion gets the tail end of the job done ? then comes back to do earlier steps ? other than that, you do a loop, ..( a for loop is just like a while loop, its just the margs is built into the for loop) but then, of course there may be optimisations due to the particular problem at hand eg the very basic effort, took millions of times longer than optimisation included code... link to this video