Skip to content

streams: isNaN() in howMuchToRead() is slow #936

@bnoordhuis

Description

@bnoordhuis
             6.93%
                LazyCompile:*isNaN native v8natives.js:67
                LazyCompile:*howMuchToRead _stream_readable.js:208
                LazyCompile:*Readable.read _stream_readable.js:246
                LazyCompile:*readableAddChunk _stream_readable.js:122
                LazyCompile:*onread net.js:495
                Builtin:ArgumentsAdaptorTrampoline
                Builtin:JSEntryTrampoline
                Stub:JSEntryStub
                v8::internal::Execution::Call
                v8::Function::Call
                node::AsyncWrap::MakeCallback
                node::StreamWrap::OnRead
                uv__read
                uv__stream_io
                uv__io_poll
                uv_run
                node::Start
                __libc_start_main
                0xbf4e258d4c544155

This isNaN() call frequently pops up in I/O-heavy benchmarks as the top cost center.

/cc @chrisdickinson

Metadata

Metadata

Assignees

No one assigned

    Labels

    streamIssues and PRs related to the stream subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions