Skip to content

String.substring - very low performance #27810

@DisDis

Description

@DisDis

I created a mini performance test for String.substring
https://github.com/DisDis/dart_vs_nodejs_substring

Dart VM version: 1.20.1 (Wed Oct 12 22:00:54 2016) on "linux_x64"

NodeJs slice string test

Str length:99900
Time: 4ms
Str length:1

real 0m0.059s
user 0m0.056s
sys 0m0.000s

Dart slice (substring) string test

Str length: 99900
Time: 1865ms
Str length: 1

real 0m1.930s
user 0m1.920s
sys 0m0.032s

dart ~450 times slower nodejs.
Observatory says

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions