Back to mods

Modrinth · Minecraft mod

Experimental Performance

improves Minecraft performance in several aspects

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Experimental Performance release should I use?

Updated 2 years ago
beta file 0.1.1
Game version 1.20.4
Loader Fabric

Experimental Performance 0.1.1 targets 1.20.4 with Fabric. Installation on the client is optional. Installation on the dedicated server is optional. No extra mods listed for this file.

Where it goes

Is Experimental Performance required on the client, server, or both?

Installation on the client is optional. Installation on the dedicated server is optional.

Client Optional
Dedicated server Optional
Loader for this release Fabric
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source marks this as usable on both the client and server.

What else does Experimental Performance 0.1.1 need?

0.1.1. Change the file and its required mods may change too.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add Experimental Performance without breaking your instance.

Built for Experimental Performance 0.1.1. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 0.1.1. It targets 1.20.4 with Fabric; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    Installation on the client is optional. Installation on the dedicated server is optional.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 0.1.1. It opens that exact file at the source.

About this project

What does Experimental Performance add?

Memory Allocation
Some classes can be very memory dense, they have a big memory footprint.
This is an issue because your computer can only fit 64 bytes into a processor's cache line, so anything over 64 needs to be split into multiple lines. This can drastically slow down operations based on what is being called.
So obviously the best solution is to make sure nothing is over 64 bytes, this is a lot easier said than done, since there's multiple downsides to this, although they don't matter in the circumstances that ive optimized.

Chunk Memory Allocation
Chunks are very memory dense and take up 80 bytes. Using some hacky fabric-ASM we are able to nuke variables from the Chunk class and redirect all the calls.
This allows us to bring the chunk back down to 64, which on some computers can make most chunk operations 0.25x faster!

Block Memory Allocation
Blocks are also very memory dense, taking up 72 bytes.
We do the same thing as Chunks, we move stuff into a BlockInfo class and reduce the weight of the class.
This not only makes it so most blocks can now be passed along faster, but also prevents some blocks from going over 128 bytes, which would need 3 cache lines.

Entity Memory Allocation
Unlike Chunk & Block, entity is its own nightmare. It takes up 272 bytes, which is 5 cache lines. No wonder entities are laggy xD
I've optimized it to 4 cache lines, although going any further will break more mod compatibility than I have the time to fix.
If the mod grows big enough at some point, I may rewrite the entire entity class and just provide an API for the values you would want.

Why is Mojang not doing this?
Well they kinda are?
When making my optimizations I noticed that mojang has actually made the same performance improvements that I'm doing. Such as LevelInfo, although that was years ago?
Mojang does not seem to care about performance much these days, they make really weird performance changes but never seem to really care too much. Some classes have grown a lot in the last years, and they haven't really noticed how dense they have become.
That's fine though, cause I'm here to help.

The game of cat and mouse
Performance is hard to get more of, it's a very complex puzzle which requires you to understand every single part of it in a lot of detail.
Put simply, computers are not simple. They try really hard to make it easier for the programmer to not think about it, although programmers should be thinking about it at all times.
What am I talking about?
Well the performance I get with this mod comes at a cost, extra calls and memory allocation. I'm simply optimizing the structures within the game to work as smoothly and quickly with the computer, although that requires the computer to remember more things.
Unfortunately, you won't notice that cost since in most of these situations the performance win greatly overcomes the loss.

Experimental!!!
Seems I need to continue saying it. This mod is highly experimental and does some super sketch ASM magic to gain performance by simply moving classes around. Do not include this in modpacks, and do not make issues about compatibility. This mod was made as a proof of concept to see if we could further optimize minecraft by reducing the classes sizes in the cache lines. This mod showed a clear performance win, although its pretty untested and still needs LOTS of work. I don't have time to continue working on this mod currently

Project description from Modrinth.

Pick your setup

Experimental Performance by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

1 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Experimental Performance versions and loaders

1 of 1 releases match

Looking for an older file? The official Modrinth project page is in Resources.