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 

May 2026

World Cup stickers 2026

Apr 2026

A new puzzle every day
Mixing Wordle with other games

Feb 2026

Christmas (2025) is over
 2025 

Dec 2025

Christmas card 2025

Nov 2025

Christmas (2025) is coming!

Sep 2025

The partridge puzzle

Aug 2025

TMiP 2025 puzzle hunt

Jun 2025

A nonogram alphabet

Mar 2025

How to write a crossnumber

Jan 2025

Christmas (2024) is over
Friendly squares
 2024 

Dec 2024

A regular expression Christmas puzzle
Christmas card 2024

Nov 2024

Christmas (2024) is coming!

Feb 2024

Zines, pt. 2

Jan 2024

Christmas (2023) is over
 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

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

Archive

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