Skip to content
Permalink
Browse files

Crafting speedup

This greatly increases crafting performance, especially in worlds with many mods.

Approved by @kwolekr.

Introduces a hash-type-layered fall-through mechanism, where every layer specifies one hash algorithm,
and the "deeper the fall", the more collisions to expect for the algorithm. One Craft definition
only resides at one layer, which improves speed for lower layers (and a complete fail), due to most
craft definitions residing at high layers.

Due to the fall-through design, the undocumented behaviour that later craft recipes
override older ones had to be weaked up a bit, but craft recipes with the same hash and layer
will still override.
  • Loading branch information...
est31 committed Apr 3, 2015
1 parent fedbbc8 commit 334e70455b7f8a4607fe99dc12710d48169113a6
Showing with 349 additions and 88 deletions.
  1. +263 −75 src/craftdef.cpp
  2. +83 −13 src/craftdef.h
  3. +3 −0 src/server.cpp
Oops, something went wrong.

0 comments on commit 334e704

Please sign in to comment.
You can’t perform that action at this time.