Skip to content

Binary decoding is slow #1804

Open
Open
@sjakobi

Description

@sjakobi

There have been a few reports of slow binary decoding performance on Discourse recently:

In general, people seem to get only about 10 MB/s.

I've tried profiling dhall decode with the new --quiet option, but the output only points at two functions from cborg:

COST CENTRE            MODULE              SRC                                      %time %alloc

getDecodeAction        Codec.CBOR.Decoding src/Codec/CBOR/Decoding.hs:311:1-55       81.5   88.7
deserialiseIncremental Codec.CBOR.Read     src/Codec/CBOR/Read.hs:(165,1)-(167,46)   18.5   11.0

Things to investigate:

  • Might high rates of branch mispredictions slow us down?

Things to try:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions