mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
speedup bit_vector::num_words()
Proof of equivalence w.r.t. previous code: http://rise4fun.com/Z3/aiLV Signed-off-by: Nuno Lopes <t-nclaud@microsoft.com>
This commit is contained in:
parent
da83a6b28c
commit
25a41d48dc
1 changed files with 2 additions and 1 deletions
|
@ -37,7 +37,8 @@ class bit_vector {
|
|||
}
|
||||
|
||||
static unsigned num_words(unsigned num_bits) {
|
||||
return (num_bits % 32) == 0 ? (num_bits / 32) : ((num_bits / 32) + 1);
|
||||
// return (num_bits % 32) == 0 ? (num_bits / 32) : ((num_bits / 32) + 1);
|
||||
return (num_bits + 31) / 32;
|
||||
}
|
||||
|
||||
void expand_to(unsigned new_capacity);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue