Skip to content

Print.print(String) is 12 times slower than Print.write(buf*, len) #1760

Closed
@ffissore

Description

@ffissore

That's because size_t Print::print(const String &s) calls write for each char, instead that using String internal buffer and len attributes
Using them directly makes print 12 times faster (as measured by Silverstrino)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CoreRelated to the code for the standard Arduino API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions