Skip to content

Feature/improve perf#69

Merged
ContentsViewer merged 9 commits into
mainfrom
feature/improve-perf
May 11, 2025
Merged

Feature/improve perf#69
ContentsViewer merged 9 commits into
mainfrom
feature/improve-perf

Conversation

@ContentsViewer
Copy link
Copy Markdown
Member

No description provided.

@ContentsViewer ContentsViewer requested a review from Copilot May 3, 2025 11:14
Copy link
Copy Markdown

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 introduces performance improvements along with additional tests and benchmarks for the EventLoop module, and refactors a couple of math utilities and API signatures for consistency.

  • Added comprehensive tests and benchmarking for the EventLoop in tests/event_loop/event_loop.cpp.
  • Introduced a fast, inlined absolute value implementation in include/nodec/math/math.hpp and updated its usage in include/nodec/gfx/frustum.hpp.
  • Updated the ArrayView constructor in include/nodec/array_view.hpp for consistent pointer type.
  • Provided complete implementation of an asynchronous EventLoop in include/nodec/event_loop.hpp.

Reviewed Changes

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

Show a summary per file
File Description
tests/event_loop/event_loop.cpp Added test cases and benchmarks for the EventLoop functionality.
include/nodec/math/math.hpp Added a fast, inline abs() function and updated approx_equal accordingly.
include/nodec/gfx/frustum.hpp Switched to using math::abs for consistency in numeric operations.
include/nodec/event_loop.hpp Provided a complete EventLoop implementation with scheduling and waiting logic.
include/nodec/array_view.hpp Fixed the ArrayView constructor signature to use the correct pointer type.
Files not reviewed (1)
  • tests/CMakeLists.txt: Language not supported
Comments suppressed due to low confidence (1)

include/nodec/array_view.hpp:50

  • [nitpick] Consider confirming that the change from 'pointer *first' to 'pointer first' aligns with the intended API usage and all consumers of ArrayView are updated accordingly.
ArrayView(pointer first, std::size_t size) noexcept

while (wait_for_events(max_wait)) {
spin_once();
}
return;
Copy link

Copilot AI May 3, 2025

Choose a reason for hiding this comment

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

[nitpick] The explicit 'return;' at the end of the spin() function is superfluous and can be removed to improve code clarity.

Suggested change
return;

Copilot uses AI. Check for mistakes.
@ContentsViewer ContentsViewer merged commit abab1fb into main May 11, 2025
1 check passed
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