uber / uber/h3

Inline _isBaseCellPentagon

Open
#984 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
C
Stars
6.5k
Forks
627
Avg merge
3d 21h
Merged PRs (30d)
6

Description

This is a follow-up for https://github.com/uber/h3/pull/968

As discussed in https://github.com/uber/h3/pull/968, it would be nice to inline _isBaseCellPentagon for use in isValidCell (and potentially other spots in the code base).

I couldn't get this working in https://github.com/uber/h3/pull/968 after trying a mixture of inline and extern, so making this ticket to follow up and revisit.

Some notes:

  • maybe benchmark the array of structs vs stuct of arrays in baseCellData

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

Start at _isBaseCellPentagon and its use in isValidCell, then review PR #968 for the prior inline/extern attempts. Check the baseCellData representation and benchmark array-of-structs versus struct-of-arrays; done means the helper is inlined where appropriate and the chosen layout is supported by benchmark results.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.