Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Learn from flutter hashValues – no recursion, more better #7

Open
kevmoo opened this issue Nov 21, 2016 · 4 comments
Open

Learn from flutter hashValues – no recursion, more better #7

kevmoo opened this issue Nov 21, 2016 · 4 comments

Comments

@kevmoo
Copy link
Contributor

kevmoo commented Nov 21, 2016

See https://github.com/flutter/engine/blob/52bbe398a5f1d77651e3f017fd5be6cf26afd705/lib/ui/hash_codes.dart

@kevmoo
Copy link
Contributor Author

kevmoo commented Nov 21, 2016

CC @davidmorgan

@davidmorgan
Copy link
Contributor

Fun. I guess what built_value generates now, e.g.

https://github.com/google/built_value.dart/blob/master/example/lib/collections.g.dart#L63

is a tiny bit faster, no optional parameters or if statements -- but costs a little code size.

@kevmoo
Copy link
Contributor Author

kevmoo commented Nov 21, 2016

@davidmorgan When you know statically what the number of args is, sure.

@davidmorgan
Copy link
Contributor

Yes. Just making the point that generation is always going to be better :) ... source_gen FTW.

Still makes sense for quiver, though.

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

No branches or pull requests

3 participants