| benchmark | 1.20-pre1 | 1.20-pre2 |
|---|---|---|
| baseline | 263.479460184556 ± 55.44590623221055 [ns/op] | 262.6772200457718 ± 55.05785493224197 [ns/op] |
| data_get_byte | 433.98316762350913 ± 7.444825260824145 [ns/op] | 391.87628185594724 ± 18.936628742014072 [ns/op] |
| data_get_byte_1 | 740.4393732769925 ± 20.93953249166631 [ns/op] | 456.17101920010447 ± 8.630503299692144 [ns/op] |
| data_get_int | 412.08435852317024 ± 4.056129450233465 [ns/op] | 374.34500487014526 ± 2.435684193080521 [ns/op] |
| data_get_int_1 | 737.7503310023358 ± 13.85836437954026 [ns/op] | 423.18244626398047 ± 1.329924149473285 [ns/op] |
| data_get_list_0 | 406.8077717359254 ± 13.273700931499596 [ns/op] | 380.8705782109833 ± 18.39461975718555 [ns/op] |
| data remove storage _ _ | |
| data modify storage _ _[] set value 0 |
| data remove storage _ a | |
| data remove storage _ b | |
| function ite |
Each test ranks a list of possible commands from best (most efficient) to worst (least efficient). Lower percentages are better. You can only compare the percentages between the commands in the same test.
These tests were done in a superflat world with no entities except for the player. The only commands running are the ones from the test.
| tick | |
| commandFunctions | |
| minecraft:tick -> (Server) | |
| minecraft:load -> (Server) | |
| levels | |
| $level | |
| timeSync | |
| tick | |
| world border | |
| weather |
This gist intends on clearing up some of the misinformation surrounding signed chat/the reporting feature Mojang has added to Minecraft 1.19.1. Here you can find both technical information as well as a general explanation of how these work.
After joining a server, clients now send a profile key used for verifying a message's authenticity. This key and thus the whole signing process is optional, but by default, servers enforce secure profiles for clients to send chat messages. Whenever the player sends a chat message and has a key associated, the message will be signed using their own private key, which the server then verifies using the public key sent after join. Assuming signature, timestamp, and message contents line up, the message goes through.
On the other end, clients can also require all broadcasted player messages to be signed, disregarding the ones without sender verified signatures.
⚡ = Advancement trigger
✨ = Enchantment effect
MinecraftServer::tickServer- 🕑 Update
/tickrate manager ServerFunctionManager::tick▶️ Run #load function tag if a reload happened▶️ Run #tick function tag
ServerLevel::tick(per dimension)
- 🕑 Update
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs