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

Static attribute lists #1962

Merged
merged 18 commits into from
Jul 31, 2021
Merged

Conversation

bakape
Copy link
Contributor

@bakape bakape commented Jul 19, 2021

Description

Build attribute key or entire key-value lists at compile time. This reduces allocation size for dynamic attribute vectors and allows performing cheap array pointer equality checks for the hottest attribute comparison paths.

Benchmark results:
Screenshot_20210719_214942

Checklist

  • I have run cargo make pr-flow
  • I have reviewed my own code
  • I have added tests

packages/yew/src/html/classes.rs Show resolved Hide resolved
packages/yew/src/virtual_dom/vtag.rs Outdated Show resolved Hide resolved
bakape and others added 2 commits July 31, 2021 19:22
Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk>
@siku2 siku2 merged commit 8fbb1a2 into yewstack:master Jul 31, 2021
@voidpumpkin voidpumpkin added A-yew Area: The main yew crate A-yew-macro Area: The yew-macro crate labels Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-yew Area: The main yew crate A-yew-macro Area: The yew-macro crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants