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

Improve Element#attribute implementation as 6500x faster #146

Merged
merged 3 commits into from
Jun 13, 2024

Commits on Jun 13, 2024

  1. Improve Element#attribute as 6500x faster

    `Element#namespaces` is heavy method because this method needs to
    traverse all ancestors of the element. `Element#attribute` calls
    `namespaces` redundantly, so it is much slower.
    
    This commit reduces `namespaces` calls in `Element#attribute`.
    Also, this commit removes a redundant `respond_to?` because
    `namespaces` must return `Hash` in the current implementation.
    makenowjust committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    418bc94 View commit details
    Browse the repository at this point in the history
  2. Update benchmark/attribute.yaml

    Co-authored-by: Sutou Kouhei <[email protected]>
    makenowjust and kou authored Jun 13, 2024
    Configuration menu
    Copy the full SHA
    53c6d5f View commit details
    Browse the repository at this point in the history
  3. Update benchmark names

    makenowjust committed Jun 13, 2024
    Configuration menu
    Copy the full SHA
    39f77ce View commit details
    Browse the repository at this point in the history