Skip to content

FOO::csv_line #145

Closed
Closed

Description

@yakra

Many (all?) of the csv_line functions could probably become voids that insert multiple C strings directly into the ofstream.
HighwaySegment::csv_line for example has 8 concatenation + operators. All this copying & re-copying gets expensive.

While in there, also check out TravelMapping#324

Activity

  1. yakra commented on Mar 21, 2022

    @yakra
    OwnerAuthor

    TravelMapping#505 was put on hold, but a rebased copy of 597682e should re-appear shortly.
    That takes care of Route & ConnectedRoute. Instead of a void, inlined the insertions right into sql_file.cpp.
    For the sake of Getting On With It, I'll assume there's no point in doing void functions (8 more lines of code overall) just to get rid of some dereferencing there. Creating references didn't help speed, I'll assume such a "dereference" would be created under the hood by such a function. Either the multiple dereferences I have now don't hurt, or it all gets optimized away by the compiler.

    That leaves Waypoint & HighwaySegment, which can be handled as part of the broader-scope #213.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions