Skip to content

Replace xxh64 with the even faster xxh3 for SVG gradient id creation #227

@vlakoff

Description

@vlakoff

Dedicated issue for the suggestion I raised in #187 (comment):

Nit: the newer xxh3 would be a better choice than xxh64 — it's even faster while keeping the same 64‑bit width.

If someone wants to take this on, the main code change is simply replacing xxh64 with xxh3 in:

$id = sprintf('g%d-%s', ++$this->gradientCount, hash('xxh64', $toBeHashed));

The more tedious part is updating the expected id attribute in these 2 snapshot files:

Also, since this change affects the generated SVG output, it should probably be treated as a breaking change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions