Skip to content

Making LINK9 ~4x faster#230

Merged
Bruno02468 merged 1 commit into
MystranSolver:devfrom
Bruno02468:custom_formatter
May 29, 2026
Merged

Making LINK9 ~4x faster#230
Bruno02468 merged 1 commit into
MystranSolver:devfrom
Bruno02468:custom_formatter

Conversation

@Bruno02468
Copy link
Copy Markdown
Collaborator

After noticing some decks spent a significant fraction of their runtime in LINK 9 (output writing), @Copper280z and I ran some benchmarks. The conclusion? Fortran's FORMAT is depressingly slow, especially when you use it to format a bunch of floating-point numbers. The solution? A custom formatter, still written in Fortran, but bypassing the FORMAT stuff.

Two new subroutines have been introduced: FMT_ES14_6 and FMT_I8_RJ, and several subroutines in LK9 have been modified to use the new utilities. Oh, and I also got rid of some array-zeroing loops because they also hinder performance.

The result? Some output-heavy decks now spend 4x less time (from 2min to 30s) in LINK 9.

Thanks to @Copper280z and @victorkemp for participating in the discussion and helping cook up the benchmarks!

@Bruno02468 Bruno02468 merged commit 074fc8a into MystranSolver:dev May 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant