Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly improved API. Dramatically improved implementation #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Slightly improved API. Dramatically improved implementation #1

wants to merge 4 commits into from

Commits on Sep 15, 2014

  1. Update geohash.h

    The API has no reason to pass the range arguments by reference.  Doing so slows down the function.  
    The arguments are not return values, and the first thing the code does is dereference them and copy them into stack variables.  Passing the input ranges by value skips this step and has fewer errors.  Furthermore, the arguments are small enough (2 primatives) that putting them onto the stack by value can make the function call inline even faster.
    Steve132 committed Sep 15, 2014
    Configuration menu
    Copy the full SHA
    dec4701 View commit details
    Browse the repository at this point in the history
  2. Update geohash.c

    Same change as before: change input arguments to stack based arguments for efficiency.  This also allows us to skip the case where the inputs == NULL in the error check
    Steve132 committed Sep 15, 2014
    Configuration menu
    Copy the full SHA
    d171985 View commit details
    Browse the repository at this point in the history
  3. Update geohash.c

    Steve132 committed Sep 15, 2014
    Configuration menu
    Copy the full SHA
    ec1c7e0 View commit details
    Browse the repository at this point in the history
  4. Update geohash.c

    I re-wrote the encode and decode functions to provide a DRAMATICALLY faster interface that does no branching and uses only a few 64-bit integer operations with unrolled loops to do the interleaving/deinterleaving using binary magic numbers for efficient morton codes.  The code should go much much much faster now.
    Steve132 committed Sep 15, 2014
    Configuration menu
    Copy the full SHA
    768f561 View commit details
    Browse the repository at this point in the history