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

Performance improvements #10

Merged
merged 3 commits into from
Apr 12, 2024
Merged

Performance improvements #10

merged 3 commits into from
Apr 12, 2024

Conversation

ciscorn
Copy link
Member

@ciscorn ciscorn commented Apr 12, 2024

bad-hole time: [4.7701 µs 4.7764 µs 4.7843 µs]
change: [-7.5315% -7.1720% -6.8299%] (p = 0.00 < 0.05)

building time: [210.68 ns 210.99 ns 211.39 ns]
change: [-14.200% -13.938% -13.706%] (p = 0.00 < 0.05)

degenerate time: [51.923 ns 52.000 ns 52.095 ns]
change: [-24.205% -23.925% -23.641%] (p = 0.00 < 0.05)

dude time: [6.9004 µs 6.9139 µs 6.9285 µs]
change: [-18.659% -18.323% -18.035%] (p = 0.00 < 0.05)

empty-square time: [88.237 ns 88.399 ns 88.602 ns]
change: [-18.376% -18.025% -17.696%] (p = 0.00 < 0.05)

water time: [680.86 µs 683.64 µs 686.74 µs]
change: [-12.109% -11.628% -11.157%] (p = 0.00 < 0.05)

water2 time: [425.74 µs 429.01 µs 432.30 µs]
change: [-27.032% -26.560% -26.016%] (p = 0.00 < 0.05)

water3 time: [20.170 µs 20.201 µs 20.238 µs]
change: [-18.551% -18.249% -17.969%] (p = 0.00 < 0.05)

water3b time: [1.4299 µs 1.4318 µs 1.4340 µs]
change: [-14.272% -13.937% -13.597%] (p = 0.00 < 0.05)

water4 time: [116.44 µs 117.82 µs 119.52 µs]
change: [-19.773% -18.881% -17.925%] (p = 0.00 < 0.05)

water-huge time: [11.871 ms 11.886 ms 11.903 ms]
change: [-4.1979% -4.0088% -3.8230%] (p = 0.00 < 0.05)

water-huge2 time: [24.799 ms 24.829 ms 24.861 ms]
change: [-8.3678% -8.0259% -7.6721%] (p = 0.00 < 0.05)

Summary by CodeRabbit

  • Refactor
    • Renamed and modified various benchmarks for clarity and improved testing.
  • New Features
    • Introduced new benchmarks to enhance performance measurement.
  • Bug Fixes
    • Adjusted assertion conditions in example functionality for accurate triangle count verification.
  • Chores
    • Updated package dependencies to ensure compatibility and performance.

Copy link

coderabbitai bot commented Apr 12, 2024

Walkthrough

The recent updates involve a significant overhaul in benchmarks and examples, refining existing tests and adding new ones for improved accuracy. The changes aim to enhance testing capabilities, address outdated benchmarks, and ensure precise validations across the codebase.

Changes

File Paths Changes Summary
benches/benchmark.rs - Renamed "water" to "bad-hole".
- Added benchmarks: "degenerate", "dude", "empty-square", "water4", "water-huge", "water-huge2".
- Removed "rain", "hilbert".
- Modified "water-huge" with an assertion check.
examples/example.rs - Updated assertion to check triangles length equals num_triangles * 3.
Cargo.toml - Updated earcut package version to 0.3.6.
- Added no-std category to package metadata.

Poem

🐇💻 CodeRabbit's ode to change:
"From water flows to bad-hole deep,
Where triangles multiply and leap.
Old tests fade like last year's leaf,
New challenges, the coder's sheaf.
Hop, skip, a code-bunny's joy,
In every line, a bug to toy!" 🌟🚀


Recent Review Details

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 0032bae and 08b3bc8.
Files selected for processing (1)
  • Cargo.toml (1 hunks)
Additional comments not posted (2)
Cargo.toml (2)

3-3: Version update from 0.3.5 to 0.3.6 appears appropriate and aligns with the performance improvements described in the PR.


9-9: Addition of the no-std category to the package metadata. This is a significant enhancement for usage in environments without the standard library. Please ensure this feature is well-documented and its impact is verified.


Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Apr 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.53%. Comparing base (97503ac) to head (0032bae).

❗ Current head 0032bae differs from pull request most recent head 08b3bc8. Consider uploading reports for the commit 08b3bc8 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #10      +/-   ##
==========================================
- Coverage   99.54%   99.53%   -0.01%     
==========================================
  Files           2        2              
  Lines         882      868      -14     
==========================================
- Hits          878      864      -14     
  Misses          4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ciscorn ciscorn enabled auto-merge (squash) April 12, 2024 09:35
@ciscorn ciscorn merged commit c782a9a into main Apr 12, 2024
1 check passed
@ciscorn ciscorn deleted the tuning branch April 12, 2024 09:35
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

src/lib.rs Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
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.

None yet

1 participant