Files
ladybird/AK
Tim Schumacher b1136ba357 AK: Efficiently resize CircularBuffer seekback copy distance
Previously, if we copied the last byte for a length of 100, we'd
recalculate the read span 100 times and memmove one byte 100 times,
which resulted in a lot of overhead.

Now, if we know that we have two consecutive copies of the data, we just
extend the distance to cover both copies, which halves the number of
times that we recalculate the span and actually call memmove.

This takes the running time of the attached benchmark case from 150ms
down to 15ms.
2023-04-14 10:03:42 +02:00
..
2023-03-09 21:43:54 +01:00
2023-03-09 21:43:54 +01:00
2023-03-09 21:43:54 +01:00
2023-04-12 19:37:35 +02:00
2023-02-04 18:47:02 -07:00
2023-04-12 07:33:15 -04:00
2023-02-10 12:15:02 +01:00
2023-04-12 19:37:35 +02:00
2023-03-09 21:43:54 +01:00
2023-03-14 16:52:44 +01:00
2023-03-09 21:43:54 +01:00
2023-03-09 21:43:54 +01:00
2023-03-09 21:43:54 +01:00
2023-03-09 21:43:54 +01:00
2023-03-09 21:43:54 +01:00