crossbeam icon indicating copy to clipboard operation
crossbeam copied to clipboard

queue/SegQueue: simplify len calculation

Open BusyJay opened this issue 4 years ago • 2 comments

BusyJay avatar Aug 27 '19 12:08 BusyJay

It seems a new version of cfg-if breaks the CI instead of the patch.

BusyJay avatar Sep 20 '19 11:09 BusyJay

This is a nice optimisation and it seems correct in that assuming tail >= head, Z3 tells me that the PR'd implementation is exactly equivalent to the current one on both 32-bit and 64-bit systems, except for when tail == 2**32 - 2 or tail == 2**64 - 2, respectively. I have no idea how the queue works - is this something to worry about? CC @stjepang @taiki-e

P.S. Sorry for taking a year to review..

Vtec234 avatar Sep 18 '20 04:09 Vtec234