summaryrefslogtreecommitdiff
path: root/src/misc.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-10-20 16:36:35 +0000
committerrubidium <rubidium@openttd.org>2009-10-20 16:36:35 +0000
commit86031d434d11bb531a1a79239530e81f6627976b (patch)
tree48074ade0edb087574397938bf09c0db01529991 /src/misc.cpp
parent06c55863ca6b5bff147c2b11f08f7193fc2a9f81 (diff)
downloadopenttd-86031d434d11bb531a1a79239530e81f6627976b.tar.xz
(svn r17818) -Codechange: iterate the cargo list from the back when trying to merge packets. Chances are higher that the last packet (in the FIFO-ish queue) is mergeable with the to be added package. If a train gets loaded packets get split up and put into the different carriages, at unload they are unloaded in the same order so the last in the FIFO-ish queue is likely the packet it can merge with.
This results in a 5-10% performance improvement of CargoList's Append/MoveTo without performance degradation of AgeCargo.
Diffstat (limited to 'src/misc.cpp')
0 files changed, 0 insertions, 0 deletions