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

Row Data Stored On The Heap #1009

Merged
merged 1 commit into from
Feb 25, 2025
Merged

Row Data Stored On The Heap #1009

merged 1 commit into from
Feb 25, 2025

Conversation

Gali-StarkWare
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Gali-StarkWare Gali-StarkWare force-pushed the gali/component_trace_data branch from a8d6aa5 to f15bfa5 Compare February 20, 2025 12:18
@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2025

Codecov Report

Attention: Patch coverage is 78.72340% with 10 lines in your changes missing coverage. Please review.

Project coverage is 92.86%. Comparing base (81d1fe3) to head (329e0e2).

Files with missing lines Patch % Lines
crates/air_utils/src/trace/row_iterator.rs 66.66% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1009      +/-   ##
==========================================
- Coverage   92.88%   92.86%   -0.02%     
==========================================
  Files         105      105              
  Lines       14242    14259      +17     
  Branches    14242    14259      +17     
==========================================
+ Hits        13228    13241      +13     
- Misses        934      938       +4     
  Partials       80       80              

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

@Gali-StarkWare Gali-StarkWare force-pushed the gali/component_trace_data branch 7 times, most recently from 62ffbd0 to c30b611 Compare February 23, 2025 14:42
@Gali-StarkWare Gali-StarkWare changed the title Component Trace Data Stored in Vector Row Data Stored On The Heap Feb 23, 2025
@Gali-StarkWare Gali-StarkWare self-assigned this Feb 23, 2025
@Gali-StarkWare Gali-StarkWare marked this pull request as ready for review February 23, 2025 14:57
Copy link
Collaborator

@shaharsamocha7 shaharsamocha7 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @ohad-starkware)


a discussion (no related file):
Can we check if this causes degradation in the performance?

Copy link
Contributor Author

@Gali-StarkWare Gali-StarkWare left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @andrewmilson, @ohad-starkware, and @shaharsamocha7)


a discussion (no related file):

Previously, shaharsamocha7 wrote…

Can we check if this causes degradation in the performance?

Changed to vector so now compile time is back to normal

Copy link
Contributor

@andrewmilson andrewmilson left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 3 files at r2, all commit messages.
Reviewable status: 1 of 3 files reviewed, 2 unresolved discussions (waiting on @ohad-starkware and @shaharsamocha7)


crates/air_utils/src/trace/row_iterator.rs line 35 at r2 (raw file):

            .v
            .iter_mut()
            .map(|i| unsafe {

This is no longer an index. It's a chunk of a column

Suggestion:

col_chunk

Copy link
Contributor

@andrewmilson andrewmilson left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 3 files reviewed, 4 unresolved discussions (waiting on @Gali-StarkWare, @ohad-starkware, and @shaharsamocha7)


crates/air_utils/src/trace/row_iterator.rs line 59 at r2 (raw file):

            .v
            .iter_mut()
            .map(|i| unsafe {

Same here

Code quote:

i

crates/air_utils/src/trace/row_iterator.rs line 87 at r2 (raw file):

            left[i] = lhs;
            right[i] = rhs;
        }

This doesn't need unsafe

Suggestion:

        let (left, right) = self.data.into_iter().map(|| ...).unzip();
        ...

Copy link
Collaborator

@shaharsamocha7 shaharsamocha7 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 3 files reviewed, 4 unresolved discussions (waiting on @Gali-StarkWare and @ohad-starkware)


a discussion (no related file):

Previously, Gali-StarkWare wrote…

Changed to vector so now compile time is back to normal

nice, what about the running time?

Copy link
Collaborator

@shaharsamocha7 shaharsamocha7 left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: 1 of 3 files reviewed, 5 unresolved discussions (waiting on @Gali-StarkWare and @ohad-starkware)


crates/air_utils/src/trace/component_trace.rs line 111 at r2 (raw file):

                .iter_mut()
                .map(|col| col.as_mut_slice())
                .collect_vec(),

Do we want a collect_vec here? @andrewmilson

Code quote:

collect_vec(),

Copy link
Contributor Author

@Gali-StarkWare Gali-StarkWare left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 3 files reviewed, 5 unresolved discussions (waiting on @andrewmilson, @ohad-starkware, and @shaharsamocha7)


a discussion (no related file):

Previously, shaharsamocha7 wrote…

nice, what about the running time?

Looks same as before in the CI, we can do a comparison on the super computer


crates/air_utils/src/trace/component_trace.rs line 111 at r2 (raw file):

Previously, shaharsamocha7 wrote…

Do we want a collect_vec here? @andrewmilson

I thought it's always better to use collect_vec instead of collect


crates/air_utils/src/trace/row_iterator.rs line 35 at r2 (raw file):

Previously, andrewmilson (Andrew Milson) wrote…

This is no longer an index. It's a chunk of a column

Done.


crates/air_utils/src/trace/row_iterator.rs line 59 at r2 (raw file):

Previously, andrewmilson (Andrew Milson) wrote…

Same here

Done.


crates/air_utils/src/trace/row_iterator.rs line 87 at r2 (raw file):

Previously, andrewmilson (Andrew Milson) wrote…

This doesn't need unsafe

Nice!

Copy link
Contributor

@andrewmilson andrewmilson left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 1 of 3 files reviewed, 3 unresolved discussions (waiting on @ohad-starkware and @shaharsamocha7)


crates/air_utils/src/trace/component_trace.rs line 111 at r2 (raw file):

Previously, Gali-StarkWare wrote…

I thought it's always better to use collect_vec instead of collect

LGTM collect_vec and collect are equivalent here

Copy link
Contributor Author

@Gali-StarkWare Gali-StarkWare left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 3 files at r2, 1 of 1 files at r3, all commit messages.
Dismissed @andrewmilson from a discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @andrewmilson, @ohad-starkware, and @shaharsamocha7)

Copy link
Contributor Author

@Gali-StarkWare Gali-StarkWare left a comment

Choose a reason for hiding this comment

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

Dismissed @andrewmilson from a discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ohad-starkware and @shaharsamocha7)

Copy link
Contributor Author

@Gali-StarkWare Gali-StarkWare left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 3 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ohad-starkware and @shaharsamocha7)

@Gali-StarkWare Gali-StarkWare merged commit 6f91336 into dev Feb 25, 2025
19 checks 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.

5 participants