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

bye-bye sprintf #632

Merged
merged 3 commits into from
Jun 17, 2024
Merged

bye-bye sprintf #632

merged 3 commits into from
Jun 17, 2024

Conversation

yakra
Copy link
Contributor

@yakra yakra commented Jun 14, 2024

Closes #585.
Removes sprintf completely.
d4a8716 silences a few warnings from the new clang version on noreaster.

It's possible that XCode may still generate warnings for other functions deprecated for similar reasons, E.G. styrcpy used in the subgraph CSV routines.
Feel free to open another issue if this is the case.

"Python style floats", with a .0 at the end of integral values, are being phased out.
Cleaner simpler code, I'm not worried about keeping things diffable to siteupdate.py now that it's deprecated, and these don't affect anything in practice anyway.

  • Waypoint::str()
    No instances in nmpfps.log, so no problem.
  • tm-master.nmp
    No diffs before <-> after.
  • OUT_OF_BOUNDS & DUPLICATE_COORDS datachecks
    No instances in datacheckfps.log, so no problem.

Meanwhile, the one affecting the waypoints sql table was phased out in #623 & phased back in in #628.
*shrug* Eh, it keeps the .sql files diffable?

disk-logs
Hm. I expected more of a difference when writing to /dev/null.
There's lots of copying, comparing & sorting strings, and checking set membership.

disk-merge1
What -- lab2 & lab3 are worse now? This looks like the disk access bottleneck variability that made me start writing to /dev/null. So, I deleted mountains of logs stats & graphs left over from previous runs and tried again.
disk-merge2
"After" mostly improves on "before" this time around, but we get there by way of stuff performing worse. Go figure.

This may be one of those rare cases when the /dev/null chart is more informative.
null-merge_12 0
FreeBSD improves tons. Disk access wasn't the bottleneck; it was sprintf.
Let's zoom in.
null-merge_3 5
Everything scales up well, even if bsdlab lags behind the others.
Lab3 is the fastest on its hardware now, and lab2 is the fastest overall.

yakra added 3 commits June 9, 2024 18:51
squash into dade6dd to remove Python style floats:
* e73a895 tm-master.nmp
* a1925a2 Waypoint::str
fix warnings reported by clang 17.0.6
@yakra yakra added datacheck nmps Near-Miss Points speed labels Jun 14, 2024
@yakra
Copy link
Contributor Author

yakra commented Jun 16, 2024

Ready to rock.

@jteresco jteresco merged commit 6c13cfb into TravelMapping:master Jun 17, 2024
@jteresco
Copy link
Contributor

This will be used for tonight's site update. The common datacheck version in /fast/tm is also now updated.

@yakra yakra deleted the nmp branch June 18, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C++ siteupdate: Use of sprintf, deprecated on MacOS/XCode
2 participants