You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might be due to performance considerations for Dart2JS/DDC, since JavaScript doesn't have differentiation between int and double (all JavaScript numbers are floating point values).
There is one 'num' method for both int and double.
The method is now bigger so no longer gets inlined, so is a little slower for integers.
get:hashCode usually didn't get inlined anyway (e.g. in HashMap implementations it is an interface call).
It is quite a bit slower for non-integers, but presumably this is (1) not very common and (2) there is a benefit from avoiding hash table collisions.
If I run the following code in dart2js or in dartdevc
print((10.4).hashCode);
print((10.8).hashCode);
I get 10 in both cases, seems related to #2884
The text was updated successfully, but these errors were encountered: