Skip to content

Further optimize getBiome#637

Open
HaHaWTH wants to merge 1 commit intover/1.21.11from
opt/get-biome
Open

Further optimize getBiome#637
HaHaWTH wants to merge 1 commit intover/1.21.11from
opt/get-biome

Conversation

@HaHaWTH
Copy link
Member

@HaHaWTH HaHaWTH commented Feb 9, 2026

Eliminating fp divisions brings about 45% improvement in retrieving QuartPos.

Benchmark results (batching 4096 operations per invocation):

Benchmark                              Mode  Cnt     Score    Error  Units
BiomeLookupBenchmark.testFpDivision  avgt    5  2746.521 ± 23.079  ns/op
BiomeLookupBenchmark.testTableLookup    avgt    5  1549.182 ± 28.602  ns/op

@Dreeam-qwq Dreeam-qwq added the type: optimization Pull request for optimization label Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: optimization Pull request for optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants