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

FOO::csv_line #145

Closed
yakra opened this issue Jan 7, 2021 · 1 comment
Closed

FOO::csv_line #145

yakra opened this issue Jan 7, 2021 · 1 comment

Comments

@yakra
Copy link
Owner

yakra commented Jan 7, 2021

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

@yakra
Copy link
Owner Author

yakra commented Mar 21, 2022

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.

@yakra yakra closed this as completed Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant