mscroggs.co.uk
mscroggs.co.uk

subscribe

Comment

Comments

Comments in green were written by me. Comments in blue were not written by me.
@Lord Sméagol: Right, I wasn't using SMT (I meant it when I said without multithreading, sorry for the bad wording). I tried to use intel-based VM before with 4 cpu/8 threads, but the speedup was about 5.5 times only, and the price was only 20% less (I used Azure spot instances which are not so expensive, but some automation is needed to restart them every time they are stopped by Azure).
To give you all details, my program spent 21 days on an AMD EPYC 9004 (8 cores without SMT, Azure spot instance Standard F8als v6) using 8 threads (that is, about 160 CPU-days!)
I've published the source code, still planning to write about the optimizations: https://github.com/lightln2/partridge-...
(anonymous)
on /blog/119
               
@(anonymous): Thanks for the clarification.
I'm still (slowly) building my asm funcion. I think I have settled on register allocation, leaving only rcx as a 'scratch' register because cl will be needed for some variable shifts.
I also use the xmm registers (14 so far) to minimize memory operations to hopefully let HT/SMT get some decent gains.

How long would Matt Parker's 'terrible Python code' take to solve this problem ? :)
Ok, his maths knowledge might produce some decent algorithms, but it would help him a lot to use something that compiles to native code.
Lord Sméagol
on /blog/119
               

Archive

Show me a random blog post
 2026 

Feb 2026

Christmas (2025) is over
 2025 
▼ show ▼
 2024 
▼ show ▼
 2023 
▼ show ▼
 2022 
▼ show ▼
 2021 
▼ show ▼
 2020 
▼ show ▼
 2019 
▼ show ▼
 2018 
▼ show ▼
 2017 
▼ show ▼
 2016 
▼ show ▼
 2015 
▼ show ▼
 2014 
▼ show ▼
 2013 
▼ show ▼
 2012 
▼ show ▼

Tags

probability misleading statistics partridge puzzle finite element method standard deviation hannah fry fonts logic crochet pascal's triangle cross stitch platonic solids stickers triangles bubble bobble national lottery manchester crosswords correlation reuleaux polygons matrix of minors bots computational complexity frobel chebyshev crossnumber statistics royal institution friendly squares matrix of cofactors trigonometry european cup binary python christmas card error bars people maths gather town finite group dates game show probability polynomials matt parker rugby machine learning curvature advent calendar game of life news mathsteroids inverse matrices propositional calculus nine men's morris sobolev spaces geometry pythagoras pizza cutting tennis reddit thirteen football light noughts and crosses preconditioning runge's phenomenon approximation world cup guest posts simultaneous equations tmip gaussian elimination royal baby matrix multiplication pi data folding paper crossnumbers coins rust dataset fence posts draughts bodmas convergence boundary element methods stirling numbers speed flexagons asteroids craft kings estimation map projections data visualisation fractals oeis youtube a gamut of games ucl graphs signorini conditions quadrilaterals interpolation javascript mathsjam electromagnetic field mean alphabets newcastle captain scarlet london underground weak imposition regular expressions final fantasy books warwick the aperiodical nonograms pac-man video games sound weather station anscombe's quartet logs big internet math-off mathslogicbot harriss spiral golden spiral realhats zines turtles wave scattering talking maths in public hexapawn exponential growth folding tube maps pi approximation day determinants accuracy hats braiding chess radio 4 recursion sport dinosaurs gerry anderson edinburgh bempp live stream squares rhombicuboctahedron dragon curves martin gardner phd matrices geogebra latex go games logo christmas countdown london cambridge plastic ratio numerical analysis coventry palindromes manchester science festival datasaurus dozen raspberry pi graph theory hyperbolic surfaces errors programming 24 hour maths puzzles sorting inline code databet wool numbers ternary chalkdust magazine golden ratio kenilworth php menace arithmetic

Archive

Show me a random blog post
▼ show ▼
© Matthew Scroggs 2012–2026