Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

Optimize: Improve performance using StringBuilder and reducing map lookups

Open larrydiamond opened this issue 4 years ago • 1 comments

These are performance improvements with no new functionality.

StringBuilder will perform faster than StringBuffer as synchronization does not need to occur in these locations.
Iterating over an entrySet rather than a keySet and then looking up the entry will eliminate the need for N lookups.

All Submissions:

  • [X ] Have you followed the guidelines in our Contributing document?
  • [X ] Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. [X ] Does your submission pass tests?
  2. [X ] Have you lint your code locally prior to submission?

Changes to Core Features:

  • [ NA ] Have you added an explanation of what your changes do and why you'd like us to include them?
  • [ Existing Tests cover ] Have you written new tests for your core changes, as applicable?
  • [ Yes ] Have you successfully ran tests with your changes

larrydiamond avatar Nov 30 '21 12:11 larrydiamond

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Nov 30 '21 12:11 CLAassistant