Skip to content

Optimization in print.cpp [imported] #884

Closed
@cmaglie

Description

@cmaglie

This is Issue 884 moved from a Google Code project.
Added by 2012-04-11T11:57:21.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium

Original description

print.cpp contains

size_t Print::println(void)
{
  size_t n = print('\r');
  n += print('\n');
  return n;
}

which can be optimized to

size_t Print::println(void)
{
   return write ("\r\n");
}

It is simpler and it has less call overhead.

For a background discussion, see:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Print and Stream classThe Arduino core library's Print and Stream classesfeature requestA request to make an enhancement (not a bug fix)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions