optimized operator[] (branchless)
This commit is contained in:
parent
3370929d81
commit
2b12b5c970
@ -31,11 +31,7 @@ public:
|
||||
}
|
||||
|
||||
inline int& operator[](uint32_t i) noexcept {
|
||||
if(i < mid) {
|
||||
return old[i];
|
||||
} else {
|
||||
return nex[i];
|
||||
}
|
||||
return (i < mid) ? old[i] : nex[i];
|
||||
}
|
||||
|
||||
inline void insert(int elem) noexcept {
|
||||
|
Loading…
x
Reference in New Issue
Block a user