Skip to content

[benchmark] Add a basic benchmark for Unicode._CharacterRecognizer #63044

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

Merged
merged 1 commit into from
Jan 16, 2023

Conversation

lorentey
Copy link
Member

This measures the performance of the stdlib’s core grapheme breaking algorithm, without any String overhead.

@lorentey
Copy link
Member Author

@swift-ci benchmark

This measures the performance of the stdlib’s core grapheme breaking algorithm, without any `String` overhead.
@lorentey lorentey force-pushed the character-recognizer-benchmark branch from 0ac85ad to f56d44a Compare January 16, 2023 00:11
@lorentey
Copy link
Member Author

@swift-ci benchmark

@lorentey
Copy link
Member Author

@swift-ci smoke test

@lorentey
Copy link
Member Author

------- Performance (x86_64): -O -------
ADDED                        MIN       MAX        MEAN                MAX_RSS  
CharacterRecognizer.ascii    63.45     63.45      63.45               —        
CharacterRecognizer.mixed    21.326    21.652     21.43466666666667   —        
------- Performance (x86_64): -Osize -------
ADDED                            MIN        MAX        MEAN                 MAX_RSS  
CharacterRecognizer.ascii        66.524     66.524     66.524               —        
CharacterRecognizer.mixed        21.093     21.465     21.240333333333332   —        
------- Performance (x86_64): -Onone -------
ADDED                                 MIN       MAX       MEAN      MAX_RSS  
CharacterRecognizer.ascii             113.588   113.706   113.647   —        
CharacterRecognizer.mixed             23.667    23.727    23.697    —        
Traceback (most recent call last):
  File "/Users/ec2-user/jenkins/workspace/swift-PR-macos-perf/swift/benchmark/scripts/run_smoke_bench", line 393, in <module>
    sys.exit(main())
  File "/Users/ec2-user/jenkins/workspace/swift-PR-macos-perf/swift/benchmark/scripts/run_smoke_bench", line 147, in main
    return test_opt_levels(args)
  File "/Users/ec2-user/jenkins/workspace/swift-PR-macos-perf/swift/benchmark/scripts/run_smoke_bench", line 196, in test_opt_levels
    check_added(args, output_file)
  File "/Users/ec2-user/jenkins/workspace/swift-PR-macos-perf/swift/benchmark/scripts/run_smoke_bench", line 389, in check_added
    doctor.check()
  File "/Users/ec2-user/jenkins/workspace/swift-PR-macos-perf/swift/benchmark/scripts/Benchmark_Driver", line 734, in check
    self.analyze(self.measure(test))
  File "/Users/ec2-user/jenkins/workspace/swift-PR-macos-perf/swift/benchmark/scripts/Benchmark_Driver", line 729, in analyze
    rule(benchmark_measurements)
  File "/Users/ec2-user/jenkins/workspace/swift-PR-macos-perf/swift/benchmark/scripts/Benchmark_Driver", line 630, in _constant_memory_use
    (min_i1, max_i1), (min_i2, max_i2) = [
  File "/Users/ec2-user/jenkins/workspace/swift-PR-macos-perf/swift/benchmark/scripts/Benchmark_Driver", line 631, in <listcomp>
    (min(memory_use), max(memory_use))
TypeError: '<' not supported between instances of 'NoneType' and 'NoneType'

Error is unrelated.

@lorentey lorentey merged commit 09e8db2 into swiftlang:main Jan 16, 2023
@lorentey lorentey deleted the character-recognizer-benchmark branch January 16, 2023 03:35
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.

1 participant