Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Indexes for key/value tables in layers

Aperta
#30 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
cpp
Ambito
performance

Direzione di ricerca

Leggere include/vtzero/builder_impl.hpp per l'indice integrato, doc/advanced.md per property_mapper e include/vtzero/index.hpp per gli indici forniti. Il benchmarking con dati reali e la decisione se migliorare l'implementazione integrata o aggiungere flat map basate su vector è ancora un'attività di progettazione aperta, quindi l'issue non definisce uno stato di completamento specifico.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

This issue documents the current state of affairs concerning indexes for key/value tables. Other issues can refer back to this for context.

When building a new layer you need to populate the key/value tables while adding new properties. There are several ways of doing this:

  1. Use the builtin index. This is the easiest choice, but performance isn't great. It uses a flat vector with linear search for small numbers of entries or an std::unordered_map when there are more. Some quick benchmarks show that the current value of 20 entries beyond which the implementation switches to std::unordered_map is reasonable.
  2. Use the property_mapper. This is the best choice when copying some features (or some properties of some features) from one existing layer, it is more than twice as fast as the builtin index.
  3. Use one of the supplied indexes in index.hpp.
  4. Do everything yourself. You know the data best that you are adding and can choose the right strategy.

Medium term we should think about a better implementation for (1), but this needs more benchmarks with real data and different implementations to find the best one. Because this is hidden from the user of the library, we can always improve on this later.

It is unlikely that we'll find a much better approach for (2) than the current one. But this is only usable in very specific circumstances.

We can always add to (3), for instance adding vector-based flat maps with linear search.

Lingua principale
C++
Stelle
106
Fork
29
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.