mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 00:11:14 +01:00
[scalar-cache] Unroll a loop
This commit is contained in:
1 parent
82a0d4bd03
commit
19ab59f2f6
1 file changed
+11
-1
@@ -2586,7 +2586,17 @@ struct hb_scalar_cache_t
|
||||
void clear ()
|
||||
{
|
||||
auto *values = &static_values[0];
|
||||
for (unsigned i = 0; i < length; i++)
|
||||
unsigned i = 0;
|
||||
#ifndef HB_OPTIMIZE_SIZE
|
||||
for (; i + 3 < length; i += 4)
|
||||
{
|
||||
values[i + 0] = INVALID;
|
||||
values[i + 1] = INVALID;
|
||||
values[i + 2] = INVALID;
|
||||
values[i + 3] = INVALID;
|
||||
}
|
||||
#endif
|
||||
for (; i < length; i++)
|
||||
values[i] = INVALID;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user