mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-03 08:55:41 +02:00
Use the faster bit interleave for encode_quadkey itself
encode_vertex() computed exactly the same thing as encode_quadkey(), so there is no reason to have both. Give encode_quadkey() the branch-free implementation, which also speeds up the default encode_index, and have the shared node code call it directly. The unit test now compares it against the old bit-at-a-time loop and checks that decode_quadkey() reverses it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P2nBqZisxNQfmEmon3vE9v
This commit is contained in:
+1
-1
@@ -249,7 +249,7 @@ void add_shared_node_to_bloom(std::string &shared_nodes_bloom, unsigned long lon
|
||||
// Is the vertex at world coordinates wx, wy one of the nodes in the global list of shared nodes?
|
||||
bool is_shared_node(long long wx, long long wy, struct node const *shared_nodes_map, size_t nodepos, std::string const &shared_nodes_bloom) {
|
||||
struct node n;
|
||||
n.index = encode_vertex((unsigned) wx, (unsigned) wy);
|
||||
n.index = encode_quadkey((unsigned) wx, (unsigned) wy);
|
||||
|
||||
size_t word;
|
||||
unsigned long long mask, bits;
|
||||
|
||||
Reference in New Issue
Block a user