Skip to content

Add generic for byte order for reading #25

Closed as not planned
Closed as not planned
@kylebarron

Description

@kylebarron

Right now, we dynamically check the endianness every time we read a coordinate. We can't easily monomorphize this at all because we defer reading to later, after we've parsed the geometry.

But it may still be possible to add a generic on the read structs for the byte order.

We should test adding a B: ByteOrder

Because none of the structs are public, this is possible to do completely away from the eyes of the user. So the user doesn't even need to know about the

In theory this could make it faster to read if we're not constantly checking an enum value?

Note that this won't show up on our existing read wkb benchmark because that only reads to wkb objects and doesn't actually read the coordinates themselves. You should first add a bench that converts the WKB to geo types. And then that potentially would show an improvement here from having a generic instead of checking the enum every iteration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions