mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 06:51:01 +01:00
[hvgl] Speed up hot loop
This commit is contained in:
1 parent
4857c58ec0
commit
7b72481474
1 file changed
+10
-1
@@ -91,7 +91,16 @@ PartShape::get_path_at (const struct hvgl &hvgl,
|
||||
unsigned count = hb_min (v.length, delta.length);
|
||||
auto *dest = v.arrayZ;
|
||||
const auto *src = delta.arrayZ;
|
||||
for (unsigned i = 0; i < count; i++)
|
||||
unsigned i = 0;
|
||||
// This loop is really hot
|
||||
for (; i + 4 <= count; i += 4)
|
||||
{
|
||||
dest[i] += src[i] * scalar;
|
||||
dest[i + 1] += src[i + 1] * scalar;
|
||||
dest[i + 2] += src[i + 2] * scalar;
|
||||
dest[i + 3] += src[i + 3] * scalar;
|
||||
}
|
||||
for (; i < count; i++)
|
||||
dest[i] += src[i] * scalar;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user