Dylan K. Taylor 6b6f77f8af Chunk: improved heightmap calculation performance
recalculateHeightMapColumn is stateless, so it can't make any assumptions about which subchunks to check for blocks. However, in most the average case (6 allocated subchunks), this causes 2500+ useless SubChunk->getHighestBlockAt() calls (10 per column). Since we're calculating in bulk, we can figure out which subchunks are empty one time and ignore them for all 256 columns.
In the average case, this produced a 50-60% performance improvement for heightmap calculation (~1.1 ms -> 0.5 ms).
In extreme cases where the height is extremely varied, this produces no observable performance benefit, but for most cases with flattish terrain, it's an improvement.
It can likely be further improved, but further performance improvements are outside the scope of this commit and will likely result in more complexity increases.
2020-09-05 00:16:07 +01:00
2020-08-10 17:32:09 +01:00
2020-09-04 01:43:52 +01:00
2017-06-25 14:15:34 +01:00
2020-06-04 14:14:09 +01:00
2020-08-10 17:55:49 +01:00
2020-08-21 21:41:29 +01:00
2012-12-07 02:24:55 +01:00
2020-08-10 17:32:09 +01:00
2020-08-29 23:40:47 +01:00
2020-04-30 17:34:13 +01:00


A highly customisable, open source server software for Minecraft: Bedrock Edition written in PHP

Build Status

Getting started

Discussion/Help

For developers

Donate

  • Bitcoin Cash (BCH): qq3r46hn6ljnhnqnfwxt5pg3g447eq9jhvw5ddfear
  • Bitcoin (BTC): 171u8K9e4FtU6j3e5sqNoxKUgEw9qWQdRV
  • Stellar Lumens (XLM): GAAC5WZ33HCTE3BFJFZJXONMEIBNHFLBXM2HJVAZHXXPYA3HP5XPPS7T
  • Patreon

Licensing information

This project is licensed under LGPL-3.0. Please see the LICENSE file for details.

pmmp/PocketMine are not affiliated with Mojang. All brands and trademarks belong to their respective owners. PocketMine-MP is not a Mojang-approved software, nor is it associated with Mojang.

Languages
PHP 99.9%