Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Larger/faster version of MultiItemVariationData #153

Open
behdad opened this issue Sep 26, 2024 · 3 comments
Open

Larger/faster version of MultiItemVariationData #153

behdad opened this issue Sep 26, 2024 · 3 comments

Comments

@behdad
Copy link
Member

behdad commented Sep 26, 2024

The following takes more spec, but is faster to parse, than the existing format1:

struct MultiItemVariationData
{
  uint8 Format; // 2
  uint16 regionIndexCount;
  uint16 regionIndexes[regionIndexCount];
  CFF2IndexOf<float[]> deltaSets;
};
@Lorp
Copy link
Collaborator

Lorp commented Sep 30, 2024

Please explain the benefit of using float here, rather than int16 or int32.

@behdad
Copy link
Member Author

behdad commented Oct 1, 2024

Please explain the benefit of using float here, rather than int16 or int32.

Good point. I'll measure the runtime and report.

@behdad
Copy link
Member Author

behdad commented Oct 3, 2024

Please explain the benefit of using float here, rather than int16 or int32.

Good point. I'll measure the runtime and report.

I tried int32.

I can measure about 6% speedup using floats. This is because the numbers need to be converted to float and multiplied by a float and added; I also have SIMD codepath for SSE and NEON for the float, but those seem to have very small effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants