Skip to content

Some operations on HashSet<double> is ~5000 times slower than HashSet<int> #2859

Closed
@DartBot

Description

@DartBot

This issue was originally filed by @mdakin


What steps will reproduce the problem?
1.Run the code in server mode: https://gist.github.com/2575116

On my machine, output is:

ints
Add: 12 ms.
Contains: 3 ms.
Iterate: 5 ms.
Remove: 5 ms.
Sort list: 44 ms.

doubles
Add: 71282 ms.
Contains: 40625 ms.
Iterate: 5 ms.
Remove: 87247 ms.
Sort list: 65 ms.

What is the expected output? What do you see instead?
HashSet<double> and HashSet<int> should have a similar performance.

What version of the product are you using? On what operating system?
Mac, Linux. Dart SDK version 7149, Dartium version

Please provide any additional information below.
I checked the performance of hashCode() method on ints and doubles, they are similar (double is slightly slower, as expected).

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed-duplicateClosed in favor of an existing report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions