Skip to content

CSV parsing single-file benchmark example #13721

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

Merged
merged 1 commit into from
Jan 5, 2018

Conversation

chriseidhof
Copy link
Contributor

@milseman asked me to create a PR with this benchmarking example. I'm not sure how to run the benchmarking test suite or what else needs to happen. The parsers requires a large csv to be present (the URL is the file), I'm also not sure what the policy is there.

@chriseidhof
Copy link
Contributor Author

If anyone is interested in working on string performance and using this file as a reference implementation of sorts, there is a java shootout here: https://github.com/uniVocity/csv-parsers-comparison

Currently, even the best versions in Swift aren't getting close to Java.

If you're interested, there is another version we wrote in that Swift Talk episode: the parseAlt function here is much, much faster: https://github.com/objcio/S01E79-string-parsing-performance/blob/master/ParseCSVTests/ParseCSVTests.swift (the idea and first implementation come from @mattgallagher).

@chriseidhof chriseidhof changed the title CSV parsing example CSV parsing single-file benchmark example Jan 4, 2018
@milseman
Copy link
Member

milseman commented Jan 5, 2018

Going to merge and fix in a followup PR. It's not part of the build, so it doesn't break anything.

@milseman
Copy link
Member

milseman commented Jan 5, 2018

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit 0429813 into swiftlang:master Jan 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants