Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faster way to calculate utf8Length #286

Merged
merged 3 commits into from Jan 17, 2019
Merged

Faster way to calculate utf8Length #286

merged 3 commits into from Jan 17, 2019

Conversation

djones6
Copy link
Contributor

@djones6 djones6 commented Jan 16, 2019

Description

Applies the same performance fix for utf8 length calculation applied in Kitura/Kitura#1369 to Kitura-net, resolves a performance regression when building with Swift 5.0 snapshots.

Motivation and Context

See Kitura/Kitura#1372

How Has This Been Tested?

The Kitura-net tests pass.
Performance evaluation of a Kitura 'hello-world' app show significant improvement for Swift 5 (and a small improvement for Swift 4.2.1), eliminating the regression seen with Swift 5 builds:

               | Throughput (req/s)      | CPU (%) | Mem (kb)     | Latency (ms)                   | good
Implementation | Average    | Max        | Average | Avg peak RSS | Average  | 99%      | Max      | iters
---------------|------------|------------|---------|--------------|----------|----------|----------|-------
           421 |    63587.4 |    65449.0 |    97.2 |        26145 |      2.0 |      5.4 |    202.8 |    10
       421_fix |    64299.5 |    66892.2 |    97.5 |        26094 |      2.0 |      4.1 |    203.0 |    10
            50 |    52964.2 |    54838.8 |    99.0 |        29153 |      2.4 |      3.4 |    202.0 |    10
        50_fix |    67132.1 |    68740.2 |    97.6 |        29196 |      1.9 |      4.4 |    201.5 |    10

Checklist:

  • I have submitted a CLA form
  • If applicable, I have updated the documentation accordingly.
  • If applicable, I have added tests to cover my changes.

@ianpartridge
Copy link
Collaborator

@djones6 djones6 merged commit 9806d35 into master Jan 17, 2019
@djones6 djones6 deleted the utf8LengthPerf branch January 17, 2019 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants