promotional bannermobile promotional banner

FastSuite

A performance upgrade for the JSON recipe system.

About

FastSuite improves recipe matching performance for every mod that uses the JSON recipe system, rather than a specific subset of recipes. Its approach has changed across major versions — the current implementation (7.0.0+) uses an index-based algorithm.

Approaches

FastSuite has used three different strategies over its lifetime:

List Reordering (4.0.0 and older) — Recipes were stored in a move-to-front list, so frequently-accessed recipes migrated toward the front and became cheaper to find on subsequent lookups. First access matched vanilla speed; later accesses to deep recipes improved by >95%, with little impact on recipes already near the front.

Concurrent Matching (4.1.0 – 6.x) — For any recipe type with more than 100 recipes, matching was spread across multiple threads instead of one. This produced a 10x–12x speedup in All The Mods 8, and was more compatible and less brittle than the reordering model (e.g. it worked with Polymorph and on the first match).

Indexed Matching (7.0.0+) — The current approach drops concurrency entirely in favor of an index-based algorithm. Recipes are indexed so that only viable candidates are tested, rather than scanning the full list. This matches all recipes for an input roughly 2x–4.5x faster than vanilla, with no threading and no per-match data writes:

[Indexed] - Took an average of 93541.68 ns to match all recipes for acacia planks
[Vanilla] - Took an average of 416312.28 ns to match all recipes for acacia planks
[Indexed] - Took an average of 203072.3 ns to match all recipes for sticks
[Vanilla] - Took an average of 523836.38 ns to match all recipes for sticks
[Indexed] - Took an average of 104967.54 ns to match all recipes for crafting table
[Vanilla] - Took an average of 236834.45 ns to match all recipes for crafting table
[Indexed] - Took an average of 212810.42 ns to match all recipes for black shulker box
[Vanilla] - Took an average of 453240.12 ns to match all recipes for black shulker box
[Indexed] - Took an average of 243105.69 ns to match all recipes for failed match
[Vanilla] - Took an average of 918821.25 ns to match all recipes for failed match

If you're thinking "hey wait those numbers from 4.0.0 - 6.0.0 sound better", well, changes in vanilla diminished those to the point where concurrent matching was almost equivalent to single-threaded matching. The baseline is much faster now, but indexing can still do quite a bit better.

Compatibility

This mod is made to be non-intrusive and should work with all other mods, short of another mod also replacing the recipe manager. It is compatible with recipe modification mods such as KubeJS and CraftTweaker, and causes no issues with JEI.

FastSuite does not replace FastWorkbench or FastFurnace, though their benefits will be lessened if it is installed, since some of the work is offloaded to FastSuite. For maximum recipe performance I still advise installing all three.

Support Me

Contact

Discord: https://discord.shadowsoffire.dev

The FastSuite Team

profile avatar
  • 460
    Followers
  • 42
    Projects
  • 1.4B
    Downloads
Donate

More from Shadows_of_FireView all