Skip to content

Conversation

not-matthias
Copy link
Member

@not-matthias not-matthias commented Oct 9, 2025

Things I changed:

  • rust-bindgen: Invoke manually with the right args to only generate for our functions -> otherwise assertions for unrelated things will fail
  • Fallback to noop implementation when build fails (similar to pytest-codspeed)
  • Build with optimizations (removes a warning)
  • Replaced gnu17 with c11, otherwise it causes compilation errors when not supported.
  • Added cargo-cross tests

Copy link

codspeed-hq bot commented Oct 9, 2025

CodSpeed Performance Report

Merging #137 will degrade performances by 70%

Comparing cod-1483-error-building-codspeed-rust-with-clang (d08b3c3) with main (8923641)

Summary

⚡ 24 improvements
❌ 28 (👁 1) regressions
✅ 311 untouched

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Mode Benchmark BASE HEAD Change
WallTime build_vec 211 ns 199 ns +6.03%
Instrumentation Iterative 132.5 ns 161.7 ns -18.04%
WallTime Recursive 50.6 µs 45.6 µs +10.91%
Instrumentation Iterative[20] 132.5 ns 161.7 ns -18.04%
Instrumentation Iterative[21] 134.2 ns 163.3 ns -17.86%
WallTime Recursive[20] 50.5 µs 45.8 µs +10.28%
WallTime Recursive[21] 82 µs 74.2 µs +10.47%
WallTime small_drop 50 ns 61 ns -18.03%
WallTime large_setup 18 ns 21 ns -14.29%
👁 WallTime iter_with_setup 36 ns 44 ns -18.18%
WallTime iter_batched_large_input 36 ns 44 ns -18.18%
WallTime iter_batched_per_iteration 36 ns 44 ns -18.18%
WallTime iter_batched_ref_large_input 36 ns 44 ns -18.18%
WallTime iter_batched_ref_per_iteration 36 ns 40 ns -10%
WallTime iter_with_setup 36 ns 44 ns -18.18%
WallTime from_elem[2048] 264 ns 247 ns +6.88%
WallTime from_elem[4096] 371 ns 335 ns +10.75%
WallTime init_array[1000] 2.1 µs 1.8 µs +13.32%
WallTime mut_borrow 7 ns 8 ns -12.5%
Instrumentation iterative[0] 148.3 ns 119.2 ns +24.48%
... ... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@not-matthias not-matthias force-pushed the cod-1483-error-building-codspeed-rust-with-clang branch 3 times, most recently from e9e1f47 to 6c7b453 Compare October 13, 2025 08:57
@not-matthias not-matthias requested a review from Copilot October 13, 2025 12:32
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes compilation issues when building the codspeed crate with clang by addressing compiler-specific warnings and improving CI testing for different compilers.

  • Adds compiler warning suppressions for C code generated from Zig
  • Replaces specific tests with build-only validation for macOS and Windows
  • Expands CI matrix to test both GCC and Clang compilers on Linux

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
crates/codspeed/build.rs Adds warning suppression flags and uses clang-compatible flag handling
.github/workflows/ci.yml Updates CI matrix to test GCC/Clang separately and changes to build-only for unsupported platforms

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@not-matthias not-matthias force-pushed the cod-1483-error-building-codspeed-rust-with-clang branch 4 times, most recently from 98dfc53 to d76e6a1 Compare October 14, 2025 12:18
@not-matthias not-matthias requested a review from Copilot October 14, 2025 12:22
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@not-matthias not-matthias force-pushed the cod-1483-error-building-codspeed-rust-with-clang branch from d76e6a1 to 817b416 Compare October 14, 2025 12:25
@not-matthias not-matthias requested a review from art049 October 14, 2025 12:42
@not-matthias not-matthias force-pushed the cod-1483-error-building-codspeed-rust-with-clang branch 2 times, most recently from 1d90039 to 97933b1 Compare October 15, 2025 15:14
@not-matthias not-matthias force-pushed the cod-1483-error-building-codspeed-rust-with-clang branch from 97933b1 to d08b3c3 Compare October 15, 2025 15:23
Copy link
Member

@art049 art049 left a comment

Choose a reason for hiding this comment

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

Looks good but can you add a check in the CI making sure the bindings generated are up to date?

As well maybe a small section explaining how to generate the bindings in the README/contributing?

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