mapbox / mapbox/protozero

Optimize pbf_reader::get_packed_bool

Open
#34 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
381
Forks
82
PR merge metrics
No merged PRs in 30d

Description

`pbf_reader::get_packed_bool()` currently calls `get_packed_int32()`. But with a one-byte bool there will never be any endianness or alignment issues so we could optimize this case.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate pbf_reader::get_packed_bool() and compare its current path with get_packed_int32(). Trace the packed-bool decoding behavior and existing validation around these entry points; done means the one-byte bool case is optimized without changing decoding behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.