Skip to content

Add placeholder ordo-benchmark and JMH benchmarks #134

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 5 commits into from
Oct 31, 2024

Conversation

helmetcrest
Copy link
Contributor

@helmetcrest helmetcrest commented Oct 29, 2024

There's only one sample benchmark for each system at the moment, so as to keep the PR scope in check.

There are a couple of known issues:

  • I've heard that Gradle doesn't reliably rebuild the benchmark project when a change occurs to a dependency. Locally, I've had it skip running benchmarks when running gradlew jmh.
  • On Linux x86_64, swift package benchmark fails with a SIL verification failed: Two variables with different type but same scope! exception in the compiler. I can attach some logs if that'd be useful.

I'm not sure if this PR is too early to merge, but I'd very much appreciate pointers on how to address either the above issues, or anything else that seems unusual in my PR. For instance, my formatter keeps trying to fix indents; if that's too noisy, I can manually remove them for now and open a follow-up PR.

I can confirm that everything passes act pull_request, at least, but I needed to add a dependency on jemalloc in order to build the Swift benchmarking tool.

@helmetcrest helmetcrest marked this pull request as ready for review October 30, 2024 04:13
@helmetcrest helmetcrest requested a review from ktoso October 30, 2024 14:16
.product(name: "JavaKitNetwork", package: "swift-java"),
.product(name: "Benchmark", package: "package-benchmark"),
],
path: "Benchmarks/JavaApiCallBenchmarks",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool structure is looking good now

$(BUILD_DIR)/jextract/ExampleSwiftLibrary/MySwiftLibrary.swiftinterface; \
swift run jextract-swift \
--package-name org.swift.swiftkit.generated \
--swift-module SwiftKitSwift \
--output-directory ${SAMPLES_DIR}/SwiftKitSampleApp/src/generated/java \
--output-directory ${SAMPLES_DIR}/SwiftKitSampleApp/build/generated/sources/jextract/main \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense!

@ktoso
Copy link
Collaborator

ktoso commented Oct 31, 2024

This all looks excellent, thank you!

I only added a small note into the readme how to run the benchmarks :)

@ktoso
Copy link
Collaborator

ktoso commented Oct 31, 2024

I have now included building (not running) the benchmarks in CI as well so we don't regress them by accident.

@ktoso
Copy link
Collaborator

ktoso commented Oct 31, 2024

heh compiling swift benchmarks crashes on linux. I'll disable them in CI for now.

@ktoso ktoso merged commit 70fb530 into swiftlang:main Oct 31, 2024
11 checks passed
@ktoso ktoso mentioned this pull request Oct 31, 2024
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.

2 participants