EfficientHashing

EfficientHashing

better hashing algorithm for Vec3i & BlockPos

by
199.4K Downloads
fabricforgeneoforgeoptimization
Rent Server with this Mod

About this Mod

EfficientHashing

EfficientHashing replaced hashing algorithm of Vec3i (and its subclasses like BlockPos) with one that's much much
more collision resistant, providing performance improvement in basically wherever its hashcode is used.

Collision Resistant

We can prove this by doing a simple test. Test is perform by hashing every combination of BlockPos between
new BlockPos(-100, -20, -100) and new BlockPos(100, 50, 100) (inclusive), with the total object count reaching
2,800,000+.

Vanilla algorithm produced 194,571 unique hashcode in total. This means that at least 93% of all BlockPos hashcode are
colliding with each other.

And PhiMix, the algorithm used by EfficientHashing, produced 2868471 unique hashcode in total. This means that every
unique BlockPos object gets its unique hashcode, and NONE of all BlockPos hashcode are colliding.

Unique Hashcode Collision Collision Rate
Vanilla 194,571 2,673,900 93.2%
EfficientHashing 2,868,471 0 0%

If you're curious about the actual test code, see: here

Performant

Benchmark time:

Benchmark                     Mode  Cnt   Score   Error  Units
VecHashingBenchmark.mixin    thrpt    5  47.012 ± 1.029  ops/s
VecHashingBenchmark.vanilla  thrpt    5  49.326 ± 1.507  ops/s

PhiMix is about 95.3% the performance of original hashing algorithm. Yes, it's slower, but this performance gap is
relatively tiny compared to other hashing solution, and can be easily outweighed by the significant improvement in hash
collision resistance.

If you're curious about the actual benchmark code, see: here

Vanilla compatible

In vanilla hashing algorithm, if you hash the "default" instance of BlockPos/Vec3i, aka new BlockPos(0, 0, 0), the
produced hashcode will be 0, which happens to be the "default" instance of integer. This special behavior is also
present in PhiMix, providing the best possible vanilla compatibility.

Available Versions

EfficientHashing 1.0.0release
MC 1.21.1neoforge
November 28, 2025
EfficientHashing 1.0.0release
MC 1.20.1forge
November 28, 2025
EfficientHashing 1.0.0release
MC 1.19.2forge
November 28, 2025
EfficientHashing 1.0.0release
MC 1.18, 1.18.1, 1.18.2forge
November 28, 2025
EfficientHashing 1.0.0release
MC 1.18, 1.18.1, 1.18.2fabric
November 28, 2025

How to Install EfficientHashing on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.1).

3

Install Mod

Open the mod browser in the dashboard and search for "EfficientHashing". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabricforgeneoforge

Minecraft Versions

1.21.1, 1.21, 1.20.1 (+9 more)

Server-side

Required

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

EfficientHashing server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.1). You can switch loaders with one click in the panel.

Is EfficientHashing compatible with fabric and forge and neoforge?

EfficientHashing officially supports fabric, forge, neoforge for Minecraft 1.21.1, 1.21, 1.20.1. Note: Forge and Fabric mods are NOT cross-compatible – pick one loader and stick with it. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with EfficientHashing – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if EfficientHashing consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install EfficientHashing with just one click on your server.

Recommended RAM
4 GBfrom €5.2/mo
Minimum 3 GB | per 8 players
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
GNU Lesser General Public License v3.0 only
Server-side
Required

Supported Versions

1.21.11.211.20.11.201.19.41.19.31.19.21.19.11.191.18.2+2 more