Skip to content

Conversation

@agnxsh
Copy link
Contributor

@agnxsh agnxsh commented Dec 15, 2025

No description provided.

@github-actions
Copy link

github-actions bot commented Dec 15, 2025

Unit Test Results

       12 files  ±0    2 436 suites  ±0   47m 25s ⏱️ -32s
12 678 tests ±0  12 113 ✔️ ±0  565 💤 ±0  0 ±0 
63 716 runs  ±0  62 988 ✔️ ±0  728 💤 ±0  0 ±0 

Results for commit e5f1243. ± Comparison against base commit ced2b9f.

♻️ This comment has been updated with latest results.

if true:
return
# # Currently, this logic is broken
# if true:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can just remove this if entirely, rather than commenting it out.

localIndices[j] = idxArr[j]
localCells[j] = cellsArr[j]
# use the task wrapper which maps string errors to void
recoverCellsAndKzgProofsTask(localIndices, localCells)
Copy link
Member

Choose a reason for hiding this comment

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

there is no need for this seq as far as I can tell - just change the argument type of ...Task to openArray, then use idxArr.toOpenArray(0, columnCount - 1)

@agnxsh agnxsh marked this pull request as ready for review December 26, 2025 08:48

var
pendingFuts: seq[Flowvar[Result[CellsAndProofs, void]]]
pendingFuts: seq[Flowvar[Result[CellsAndProofs, void]]] = @[]
Copy link
Contributor

Choose a reason for hiding this comment

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

The = @[] doesn't do anything here.

pendingFuts: seq[Flowvar[Result[CellsAndProofs, void]]] = @[]
# Store actual data sequences instead of C pointers
pendingIndices: seq[seq[CellIndex]] = @[]
pendingCells: seq[seq[Cell]] = @[]
Copy link
Contributor

Choose a reason for hiding this comment

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

Likewise either of these places. https://nim-lang.org/docs/manual.html#statements-and-expressions-var-statement

Variables are always initialized with a default value if there is no initializing expression. The default
value depends on the type and is always a zero in binary.

where for a sequence, this default is documented to be @[].

# pre-size sequences so we can index-assign without reallocs
pendingFuts.setLen(blobCount)
pendingIndices.setLen(blobCount)
pendingCells.setLen(blobCount)
Copy link
Contributor

Choose a reason for hiding this comment

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

If these are going to be setLen'd immediately, why not newSeq[Flowvar[Result[CellsAndProofs, void]]](blobCount) (respectively, each seq type) them to begin with?


for i in 0 ..< dataColumns.len:
cellIndices[i] = dataColumns[i][].index
indices[i] = dataColumns[i][].index
Copy link
Contributor

Choose a reason for hiding this comment

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

The redundant/indirect assignment/copying via indices and cells is fairly expensive. Can directly ensure that pendingIndices[spawned] and pendingCells[spawned] are the right side, the have this loop assign into pendingIndices[spawned] item by item directly (respectively, pendingCells[spawned])

Can also use addr pendingIndices[spawned]/addr pendingCells[spawned] can avoid dataColumns.len lookups/bound checks/etc and allow only dereferencing two pointers each loop iteration to do so, basically caching the address of each seq item.

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