You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (sl%self.parent.block_seq_stride) ==0:
needed_blocks=sl//self.parent.block_seq_stride+1else:
needed_blocks=math.ceil(sl/self.parent.block_seq_stride)
It's too complicated. This is really equivalent to needed_blocks = math.ceil( (sl + 1) / block_seq_stride. proof
It allocates one extra page on block edges. It really should be needed_blocks = math.ceil( sl / block_seq_stride )
It uses math.ceil instead of pure integer math. why this is bad
The text was updated successfully, but these errors were encountered:
Here's an example. This is what sharktank uses for the decode step:
There are 3 problems with the section:
needed_blocks = math.ceil( (sl + 1) / block_seq_stride
. proofneeded_blocks = math.ceil( sl / block_seq_stride )
The text was updated successfully, but these errors were encountered: