Skip to content

Conversation

@agnxsh
Copy link
Contributor

@agnxsh agnxsh commented Apr 29, 2025

@agnxsh agnxsh requested a review from tersec April 29, 2025 13:58
@github-actions
Copy link

Unit Test Results

       15 files  ±0    2 630 suites  ±0   1h 17m 31s ⏱️ +22s
  6 372 tests ±0    5 870 ✔️ ±0  502 💤 ±0  0 ±0 
44 281 runs  ±0  43 603 ✔️ ±0  678 💤 ±0  0 ±0 

Results for commit 7b63b85. ± Comparison against base commit de75f6d.

@tersec tersec enabled auto-merge (squash) May 1, 2025 10:39
for colresp in columns:
let block_root =
hash_tree_root(colresp[].signed_block_header.message)
if block_root notin idList.mapIt(it.block_root):
Copy link
Contributor

@tersec tersec May 1, 2025

Choose a reason for hiding this comment

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

It doesn't have to be in this PR, but in general, this is pointlessly allocating the mapIt-resulting seq.

It only consumes this as an iterator-equivalent and at no point does it need nor should it allocate all of idList.mapIt(it.block_root) (rather, it checks against foo1.block_root, foo2.block_root, in sequence).

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, it means that it's calculated a bunch of these ahead of the item it might detect a match

@tersec tersec merged commit 94efe33 into unstable May 1, 2025
11 checks passed
@tersec tersec deleted the rf branch May 1, 2025 13:03
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.

3 participants