mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 21:57:35 +00:00
AK: Fix all quadratic-time append-loops over ByteBuffer
This commit is contained in:
parent
0ebcc99e12
commit
e147d0b572
2 changed files with 14 additions and 0 deletions
|
@ -33,6 +33,14 @@ TEST_CASE(equality_operator)
|
|||
EXPECT_EQ(d == d, true);
|
||||
}
|
||||
|
||||
BENCHMARK_CASE(append)
|
||||
{
|
||||
ByteBuffer bb;
|
||||
for (size_t i = 0; i < 1000000; ++i) {
|
||||
bb.append(static_cast<u8>(i));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME: These `negative_*` tests should cause precisely one compilation error
|
||||
* each, and always for the specified reason. Currently we do not have a harness
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue