GregTechCEu / GregTech

GregTech CE 1.12 fork continuing progression and development
GNU Lesser General Public License v3.0
223 stars 166 forks source link

Reduce allocations in RecipeBuilder #2434

Closed TechLord22 closed 1 month ago

TechLord22 commented 1 month ago

What

We very rarely actually utilize the varargs aspect of RecipeBuilder method, causing a lot of wasted allocations for single item arrays. This PR adds non-varargs methods for a single input, which is our most common case. This should reduce array allocations significantly.

Outcome

Reduces memory allocations in recipe registration and recipe logic code.