86fde60e4d
This CL optimizes Type.hashCode similarly to String.hashCode, by introducing intrinsic version of hashCode calculation which uses hashcode stored in Type instance. This is important for Flutter's .of pattern, which heavily uses Maps with Type keys. Results on Flutter stocks/build_bench.dart microbenchmark: Before: 4906 µs After: 4751 µs (minimum of 5 runs, using tip of Flutter and Flutter engine) Issue: https://github.com/dart-lang/sdk/issues/31011 Issue: https://github.com/flutter/flutter/issues/11572 Change-Id: Ifbaf721050007db49bbd969dc669d070f4ce839e Reviewed-on: https://dart-review.googlesource.com/12622 Reviewed-by: Zach Anderson <zra@google.com>