Skip to content

Adding lighter String processing methods to Strings#10640

Open
dougqh wants to merge 14 commits intomasterfrom
dougqh/strings-improvements
Open

Adding lighter String processing methods to Strings#10640
dougqh wants to merge 14 commits intomasterfrom
dougqh/strings-improvements

Conversation

@dougqh
Copy link
Contributor

@dougqh dougqh commented Feb 19, 2026

What Does This Do

Adds to StringUtils

  • fast replaceAll for a fixed string & replacement, 3x throughput compared to regex based solutions, 1/2x allocation compared to compiled regex solutions
  • added SubSequence which provides a view into a subsequence of a String without incurring significant extra allocation
  • Strings.spliit returns an Iterable can be used to do light weight simple String parsing

Motivation

In subsequent PRs, these will be used to reduce allocation from String processing throughout dd-trace-java
The first focus area for improvement is QueryObfuscator

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

Note: Once your PR is ready to merge, add it to the merge queue by commenting /merge. /merge -c cancels the queue request. /merge -f --reason "reason" skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.

- fast replaceAll for a fixed string & replacement, 3x throughput compared to regex based solutions, 1/2x allocation compared to regex solutions

- added SubSequence which provides a view into a subsequence of a String without incurring extra allocation

- Strings.spliit returns an Iterable<SubSequence> can be used to do light weight processing of a String
@dougqh dougqh requested a review from a team as a code owner February 19, 2026 15:38
@dougqh dougqh added type: enhancement Enhancements and improvements comp: core Tracer core tag: performance Performance related changes labels Feb 19, 2026
@dougqh dougqh changed the title Adding lighter String processing methods to StringUtiils Adding lighter String processing methods to Strings Feb 19, 2026
@pr-commenter
Copy link

pr-commenter bot commented Feb 19, 2026

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master dougqh/strings-improvements
git_commit_date 1771938460 1772033530
git_commit_sha be0482d a149be6
release_version 1.60.0-SNAPSHOT~be0482d740 1.60.0-SNAPSHOT~a149be6159
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1772035257 1772035257
ci_job_id 1455626240 1455626240
ci_pipeline_id 98884345 98884345
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-4l62ugsh 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-4l62ugsh 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 64 metrics, 7 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.60.0-SNAPSHOT~a149be6159, baseline=1.60.0-SNAPSHOT~be0482d740

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.064 s) : 0, 1064190
Total [baseline] (8.753 s) : 0, 8753159
Agent [candidate] (1.063 s) : 0, 1063032
Total [candidate] (8.744 s) : 0, 8743521
section iast
Agent [baseline] (1.228 s) : 0, 1228434
Total [baseline] (9.407 s) : 0, 9407457
Agent [candidate] (1.235 s) : 0, 1235249
Total [candidate] (9.376 s) : 0, 9376224
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.064 s -
Agent iast 1.228 s 164.244 ms (15.4%)
Total tracing 8.753 s -
Total iast 9.407 s 654.297 ms (7.5%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.063 s -
Agent iast 1.235 s 172.218 ms (16.2%)
Total tracing 8.744 s -
Total iast 9.376 s 632.703 ms (7.2%)
gantt
    title insecure-bank - break down per module: candidate=1.60.0-SNAPSHOT~a149be6159, baseline=1.60.0-SNAPSHOT~be0482d740

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.213 ms) : 0, 1213
crashtracking [candidate] (1.216 ms) : 0, 1216
BytebuddyAgent [baseline] (627.92 ms) : 0, 627920
BytebuddyAgent [candidate] (627.809 ms) : 0, 627809
AgentMeter [baseline] (29.097 ms) : 0, 29097
AgentMeter [candidate] (29.015 ms) : 0, 29015
GlobalTracer [baseline] (257.887 ms) : 0, 257887
GlobalTracer [candidate] (257.463 ms) : 0, 257463
AppSec [baseline] (32.935 ms) : 0, 32935
AppSec [candidate] (32.873 ms) : 0, 32873
Debugger [baseline] (62.85 ms) : 0, 62850
Debugger [candidate] (62.043 ms) : 0, 62043
Remote Config [baseline] (618.104 µs) : 0, 618
Remote Config [candidate] (611.598 µs) : 0, 612
Telemetry [baseline] (11.598 ms) : 0, 11598
Telemetry [candidate] (9.028 ms) : 0, 9028
Flare Poller [baseline] (3.764 ms) : 0, 3764
Flare Poller [candidate] (6.878 ms) : 0, 6878
section iast
crashtracking [baseline] (1.201 ms) : 0, 1201
crashtracking [candidate] (1.21 ms) : 0, 1210
BytebuddyAgent [baseline] (793.901 ms) : 0, 793901
BytebuddyAgent [candidate] (798.889 ms) : 0, 798889
AgentMeter [baseline] (11.269 ms) : 0, 11269
AgentMeter [candidate] (11.301 ms) : 0, 11301
GlobalTracer [baseline] (246.809 ms) : 0, 246809
GlobalTracer [candidate] (247.821 ms) : 0, 247821
AppSec [baseline] (31.53 ms) : 0, 31530
AppSec [candidate] (33.804 ms) : 0, 33804
Debugger [baseline] (68.259 ms) : 0, 68259
Debugger [candidate] (66.182 ms) : 0, 66182
Remote Config [baseline] (546.176 µs) : 0, 546
Remote Config [candidate] (536.626 µs) : 0, 537
Telemetry [baseline] (8.563 ms) : 0, 8563
Telemetry [candidate] (8.646 ms) : 0, 8646
Flare Poller [baseline] (3.484 ms) : 0, 3484
Flare Poller [candidate] (3.52 ms) : 0, 3520
IAST [baseline] (26.735 ms) : 0, 26735
IAST [candidate] (27.116 ms) : 0, 27116
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.60.0-SNAPSHOT~a149be6159, baseline=1.60.0-SNAPSHOT~be0482d740

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.067 s) : 0, 1067317
Total [baseline] (10.936 s) : 0, 10935911
Agent [candidate] (1.073 s) : 0, 1072785
Total [candidate] (11.027 s) : 0, 11027338
section appsec
Agent [baseline] (1.24 s) : 0, 1240374
Total [baseline] (11.01 s) : 0, 11010448
Agent [candidate] (1.24 s) : 0, 1239859
Total [candidate] (10.947 s) : 0, 10946776
section iast
Agent [baseline] (1.233 s) : 0, 1232983
Total [baseline] (11.195 s) : 0, 11194539
Agent [candidate] (1.232 s) : 0, 1232104
Total [candidate] (11.166 s) : 0, 11166210
section profiling
Agent [baseline] (1.196 s) : 0, 1195731
Total [baseline] (10.902 s) : 0, 10901853
Agent [candidate] (1.192 s) : 0, 1191595
Total [candidate] (10.978 s) : 0, 10977732
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.067 s -
Agent appsec 1.24 s 173.057 ms (16.2%)
Agent iast 1.233 s 165.667 ms (15.5%)
Agent profiling 1.196 s 128.414 ms (12.0%)
Total tracing 10.936 s -
Total appsec 11.01 s 74.537 ms (0.7%)
Total iast 11.195 s 258.628 ms (2.4%)
Total profiling 10.902 s -34.058 ms (-0.3%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.073 s -
Agent appsec 1.24 s 167.074 ms (15.6%)
Agent iast 1.232 s 159.319 ms (14.9%)
Agent profiling 1.192 s 118.81 ms (11.1%)
Total tracing 11.027 s -
Total appsec 10.947 s -80.562 ms (-0.7%)
Total iast 11.166 s 138.872 ms (1.3%)
Total profiling 10.978 s -49.606 ms (-0.4%)
gantt
    title petclinic - break down per module: candidate=1.60.0-SNAPSHOT~a149be6159, baseline=1.60.0-SNAPSHOT~be0482d740

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.195 ms) : 0, 1195
crashtracking [candidate] (1.219 ms) : 0, 1219
BytebuddyAgent [baseline] (628.425 ms) : 0, 628425
BytebuddyAgent [candidate] (631.758 ms) : 0, 631758
AgentMeter [baseline] (29.202 ms) : 0, 29202
AgentMeter [candidate] (29.246 ms) : 0, 29246
GlobalTracer [baseline] (258.004 ms) : 0, 258004
GlobalTracer [candidate] (259.089 ms) : 0, 259089
AppSec [baseline] (33.004 ms) : 0, 33004
AppSec [candidate] (32.996 ms) : 0, 32996
Debugger [baseline] (66.193 ms) : 0, 66193
Debugger [candidate] (66.443 ms) : 0, 66443
Remote Config [baseline] (616.111 µs) : 0, 616
Remote Config [candidate] (607.133 µs) : 0, 607
Telemetry [baseline] (9.982 ms) : 0, 9982
Telemetry [candidate] (9.954 ms) : 0, 9954
Flare Poller [baseline] (4.503 ms) : 0, 4503
Flare Poller [candidate] (5.261 ms) : 0, 5261
section appsec
crashtracking [baseline] (1.2 ms) : 0, 1200
crashtracking [candidate] (1.199 ms) : 0, 1199
BytebuddyAgent [baseline] (657.775 ms) : 0, 657775
BytebuddyAgent [candidate] (658.97 ms) : 0, 658970
AgentMeter [baseline] (11.943 ms) : 0, 11943
AgentMeter [candidate] (11.913 ms) : 0, 11913
GlobalTracer [baseline] (258.777 ms) : 0, 258777
GlobalTracer [candidate] (257.864 ms) : 0, 257864
AppSec [baseline] (168.3 ms) : 0, 168300
AppSec [candidate] (168.144 ms) : 0, 168144
Debugger [baseline] (66.905 ms) : 0, 66905
Debugger [candidate] (66.514 ms) : 0, 66514
Remote Config [baseline] (656.852 µs) : 0, 657
Remote Config [candidate] (659.584 µs) : 0, 660
Telemetry [baseline] (9.531 ms) : 0, 9531
Telemetry [candidate] (9.38 ms) : 0, 9380
Flare Poller [baseline] (3.776 ms) : 0, 3776
Flare Poller [candidate] (3.654 ms) : 0, 3654
IAST [baseline] (25.46 ms) : 0, 25460
IAST [candidate] (25.434 ms) : 0, 25434
section iast
crashtracking [baseline] (1.2 ms) : 0, 1200
crashtracking [candidate] (1.189 ms) : 0, 1189
BytebuddyAgent [baseline] (796.636 ms) : 0, 796636
BytebuddyAgent [candidate] (795.912 ms) : 0, 795912
AgentMeter [baseline] (11.293 ms) : 0, 11293
AgentMeter [candidate] (11.27 ms) : 0, 11270
GlobalTracer [baseline] (247.727 ms) : 0, 247727
GlobalTracer [candidate] (247.435 ms) : 0, 247435
AppSec [baseline] (34.857 ms) : 0, 34857
AppSec [candidate] (35.887 ms) : 0, 35887
Debugger [baseline] (65.381 ms) : 0, 65381
Debugger [candidate] (64.743 ms) : 0, 64743
Remote Config [baseline] (550.176 µs) : 0, 550
Remote Config [candidate] (538.62 µs) : 0, 539
Telemetry [baseline] (8.691 ms) : 0, 8691
Telemetry [candidate] (8.62 ms) : 0, 8620
Flare Poller [baseline] (3.422 ms) : 0, 3422
Flare Poller [candidate] (3.44 ms) : 0, 3440
IAST [baseline] (27.056 ms) : 0, 27056
IAST [candidate] (26.992 ms) : 0, 26992
section profiling
crashtracking [baseline] (1.202 ms) : 0, 1202
crashtracking [candidate] (1.165 ms) : 0, 1165
BytebuddyAgent [baseline] (684.576 ms) : 0, 684576
BytebuddyAgent [candidate] (681.302 ms) : 0, 681302
AgentMeter [baseline] (8.577 ms) : 0, 8577
AgentMeter [candidate] (8.546 ms) : 0, 8546
GlobalTracer [baseline] (216.103 ms) : 0, 216103
GlobalTracer [candidate] (216.082 ms) : 0, 216082
AppSec [baseline] (32.629 ms) : 0, 32629
AppSec [candidate] (32.532 ms) : 0, 32532
Debugger [baseline] (67.375 ms) : 0, 67375
Debugger [candidate] (67.443 ms) : 0, 67443
Remote Config [baseline] (641.08 µs) : 0, 641
Remote Config [candidate] (644.212 µs) : 0, 644
Telemetry [baseline] (9.083 ms) : 0, 9083
Telemetry [candidate] (9.192 ms) : 0, 9192
Flare Poller [baseline] (3.806 ms) : 0, 3806
Flare Poller [candidate] (3.788 ms) : 0, 3788
ProfilingAgent [baseline] (100.69 ms) : 0, 100690
ProfilingAgent [candidate] (100.17 ms) : 0, 100170
Profiling [baseline] (101.268 ms) : 0, 101268
Profiling [candidate] (100.742 ms) : 0, 100742
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master dougqh/strings-improvements
git_commit_date 1771938460 1772033530
git_commit_sha be0482d a149be6
release_version 1.60.0-SNAPSHOT~be0482d740 1.60.0-SNAPSHOT~a149be6159
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1772035833 1772035833
ci_job_id 1455626241 1455626241
ci_pipeline_id 98884345 98884345
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-gckbkgsy 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-gckbkgsy 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 0 performance improvements and 3 performance regressions! Performance is the same for 17 metrics, 16 unstable metrics.

scenario Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p95 Δ mean throughput candidate mean agg_http_req_duration_p50 candidate mean agg_http_req_duration_p95 candidate mean throughput baseline mean agg_http_req_duration_p50 baseline mean agg_http_req_duration_p95 baseline mean throughput
scenario:load:insecure-bank:iast:high_load worse
[+48.527µs; +128.739µs] or [+2.002%; +5.310%]
unsure
[+53.151µs; +442.568µs] or [+0.747%; +6.222%]
unstable
[-210.648op/s; +117.835op/s] or [-14.419%; +8.066%]
2.513ms 7.361ms 1414.500op/s 2.424ms 7.113ms 1460.906op/s
scenario:load:insecure-bank:iast_FULL:high_load worse
[+165.701µs; +306.093µs] or [+3.213%; +5.935%]
unsure
[+157.033µs; +932.266µs] or [+1.261%; +7.488%]
unstable
[-116.884op/s; +56.884op/s] or [-14.722%; +7.165%]
5.393ms 12.995ms 763.969op/s 5.157ms 12.450ms 793.969op/s
scenario:load:petclinic:appsec:high_load worse
[+430.527µs; +1220.252µs] or [+2.320%; +6.577%]
same
[-134.586µs; +1699.473µs] or [-0.445%; +5.620%]
unstable
[-33.207op/s; +12.707op/s] or [-13.412%; +5.132%]
19.379ms 31.020ms 237.344op/s 18.554ms 30.237ms 247.594op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.60.0-SNAPSHOT~a149be6159, baseline=1.60.0-SNAPSHOT~be0482d740
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.187 ms) : 1175, 1198
.   : milestone, 1187,
iast (3.13 ms) : 3088, 3172
.   : milestone, 3130,
iast_FULL (5.825 ms) : 5766, 5883
.   : milestone, 5825,
iast_GLOBAL (3.479 ms) : 3421, 3536
.   : milestone, 3479,
profiling (2.115 ms) : 2096, 2133
.   : milestone, 2115,
tracing (1.782 ms) : 1768, 1796
.   : milestone, 1782,
section candidate
no_agent (1.189 ms) : 1178, 1200
.   : milestone, 1189,
iast (3.234 ms) : 3191, 3277
.   : milestone, 3234,
iast_FULL (6.055 ms) : 5993, 6116
.   : milestone, 6055,
iast_GLOBAL (3.581 ms) : 3519, 3642
.   : milestone, 3581,
profiling (2.091 ms) : 2072, 2110
.   : milestone, 2091,
tracing (1.778 ms) : 1764, 1793
.   : milestone, 1778,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.187 ms [1.175 ms, 1.198 ms] -
iast 3.13 ms [3.088 ms, 3.172 ms] 1.943 ms (163.8%)
iast_FULL 5.825 ms [5.766 ms, 5.883 ms] 4.638 ms (390.9%)
iast_GLOBAL 3.479 ms [3.421 ms, 3.536 ms] 2.292 ms (193.1%)
profiling 2.115 ms [2.096 ms, 2.133 ms] 928.079 µs (78.2%)
tracing 1.782 ms [1.768 ms, 1.796 ms] 595.576 µs (50.2%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.189 ms [1.178 ms, 1.2 ms] -
iast 3.234 ms [3.191 ms, 3.277 ms] 2.045 ms (171.9%)
iast_FULL 6.055 ms [5.993 ms, 6.116 ms] 4.866 ms (409.1%)
iast_GLOBAL 3.581 ms [3.519 ms, 3.642 ms] 2.391 ms (201.1%)
profiling 2.091 ms [2.072 ms, 2.11 ms] 901.918 µs (75.8%)
tracing 1.778 ms [1.764 ms, 1.793 ms] 589.123 µs (49.5%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.60.0-SNAPSHOT~a149be6159, baseline=1.60.0-SNAPSHOT~be0482d740
    dateFormat X
    axisFormat %s
section baseline
no_agent (19.422 ms) : 19220, 19623
.   : milestone, 19422,
appsec (18.852 ms) : 18660, 19045
.   : milestone, 18852,
code_origins (17.574 ms) : 17400, 17749
.   : milestone, 17574,
iast (18.072 ms) : 17890, 18255
.   : milestone, 18072,
profiling (18.268 ms) : 18087, 18449
.   : milestone, 18268,
tracing (17.779 ms) : 17600, 17957
.   : milestone, 17779,
section candidate
no_agent (19.53 ms) : 19330, 19729
.   : milestone, 19530,
appsec (19.666 ms) : 19464, 19867
.   : milestone, 19666,
code_origins (17.393 ms) : 17223, 17563
.   : milestone, 17393,
iast (17.629 ms) : 17455, 17803
.   : milestone, 17629,
profiling (18.792 ms) : 18603, 18982
.   : milestone, 18792,
tracing (17.935 ms) : 17755, 18115
.   : milestone, 17935,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 19.422 ms [19.22 ms, 19.623 ms] -
appsec 18.852 ms [18.66 ms, 19.045 ms] -569.422 µs (-2.9%)
code_origins 17.574 ms [17.4 ms, 17.749 ms] -1.848 ms (-9.5%)
iast 18.072 ms [17.89 ms, 18.255 ms] -1.349 ms (-6.9%)
profiling 18.268 ms [18.087 ms, 18.449 ms] -1.154 ms (-5.9%)
tracing 17.779 ms [17.6 ms, 17.957 ms] -1.643 ms (-8.5%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 19.53 ms [19.33 ms, 19.729 ms] -
appsec 19.666 ms [19.464 ms, 19.867 ms] 136.115 µs (0.7%)
code_origins 17.393 ms [17.223 ms, 17.563 ms] -2.137 ms (-10.9%)
iast 17.629 ms [17.455 ms, 17.803 ms] -1.901 ms (-9.7%)
profiling 18.792 ms [18.603 ms, 18.982 ms] -737.135 µs (-3.8%)
tracing 17.935 ms [17.755 ms, 18.115 ms] -1.595 ms (-8.2%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master dougqh/strings-improvements
git_commit_date 1771938460 1772033530
git_commit_sha be0482d a149be6
release_version 1.60.0-SNAPSHOT~be0482d740 1.60.0-SNAPSHOT~a149be6159
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1772035484 1772035484
ci_job_id 1455626242 1455626242
ci_pipeline_id 98884345 98884345
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-fbui2bo3 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-fbui2bo3 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics.

Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.60.0-SNAPSHOT~a149be6159, baseline=1.60.0-SNAPSHOT~be0482d740
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.473 ms) : 1461, 1484
.   : milestone, 1473,
appsec (3.795 ms) : 3572, 4018
.   : milestone, 3795,
iast (2.256 ms) : 2186, 2325
.   : milestone, 2256,
iast_GLOBAL (2.3 ms) : 2230, 2369
.   : milestone, 2300,
profiling (2.112 ms) : 2055, 2169
.   : milestone, 2112,
tracing (2.053 ms) : 2000, 2107
.   : milestone, 2053,
section candidate
no_agent (1.467 ms) : 1456, 1479
.   : milestone, 1467,
appsec (3.76 ms) : 3540, 3980
.   : milestone, 3760,
iast (2.253 ms) : 2184, 2322
.   : milestone, 2253,
iast_GLOBAL (2.294 ms) : 2225, 2364
.   : milestone, 2294,
profiling (2.082 ms) : 2027, 2136
.   : milestone, 2082,
tracing (2.066 ms) : 2013, 2120
.   : milestone, 2066,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.473 ms [1.461 ms, 1.484 ms] -
appsec 3.795 ms [3.572 ms, 4.018 ms] 2.322 ms (157.7%)
iast 2.256 ms [2.186 ms, 2.325 ms] 782.928 µs (53.2%)
iast_GLOBAL 2.3 ms [2.23 ms, 2.369 ms] 827.242 µs (56.2%)
profiling 2.112 ms [2.055 ms, 2.169 ms] 638.957 µs (43.4%)
tracing 2.053 ms [2.0 ms, 2.107 ms] 580.611 µs (39.4%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.467 ms [1.456 ms, 1.479 ms] -
appsec 3.76 ms [3.54 ms, 3.98 ms] 2.292 ms (156.2%)
iast 2.253 ms [2.184 ms, 2.322 ms] 785.467 µs (53.5%)
iast_GLOBAL 2.294 ms [2.225 ms, 2.364 ms] 826.75 µs (56.3%)
profiling 2.082 ms [2.027 ms, 2.136 ms] 614.196 µs (41.9%)
tracing 2.066 ms [2.013 ms, 2.12 ms] 598.95 µs (40.8%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.60.0-SNAPSHOT~a149be6159, baseline=1.60.0-SNAPSHOT~be0482d740
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.143 s) : 15143000, 15143000
.   : milestone, 15143000,
appsec (14.702 s) : 14702000, 14702000
.   : milestone, 14702000,
iast (18.645 s) : 18645000, 18645000
.   : milestone, 18645000,
iast_GLOBAL (17.939 s) : 17939000, 17939000
.   : milestone, 17939000,
profiling (15.14 s) : 15140000, 15140000
.   : milestone, 15140000,
tracing (14.823 s) : 14823000, 14823000
.   : milestone, 14823000,
section candidate
no_agent (15.734 s) : 15734000, 15734000
.   : milestone, 15734000,
appsec (14.99 s) : 14990000, 14990000
.   : milestone, 14990000,
iast (18.119 s) : 18119000, 18119000
.   : milestone, 18119000,
iast_GLOBAL (17.681 s) : 17681000, 17681000
.   : milestone, 17681000,
profiling (15.24 s) : 15240000, 15240000
.   : milestone, 15240000,
tracing (14.684 s) : 14684000, 14684000
.   : milestone, 14684000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.143 s [15.143 s, 15.143 s] -
appsec 14.702 s [14.702 s, 14.702 s] -441.0 ms (-2.9%)
iast 18.645 s [18.645 s, 18.645 s] 3.502 s (23.1%)
iast_GLOBAL 17.939 s [17.939 s, 17.939 s] 2.796 s (18.5%)
profiling 15.14 s [15.14 s, 15.14 s] -3.0 ms (-0.0%)
tracing 14.823 s [14.823 s, 14.823 s] -320.0 ms (-2.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.734 s [15.734 s, 15.734 s] -
appsec 14.99 s [14.99 s, 14.99 s] -744.0 ms (-4.7%)
iast 18.119 s [18.119 s, 18.119 s] 2.385 s (15.2%)
iast_GLOBAL 17.681 s [17.681 s, 17.681 s] 1.947 s (12.4%)
profiling 15.24 s [15.24 s, 15.24 s] -494.0 ms (-3.1%)
tracing 14.684 s [14.684 s, 14.684 s] -1.05 s (-6.7%)

Comment on lines 23 to 25
* StringReplacementBenchmark.string_replaceAll thrpt 6 14611046.391 ± 4865682.875 ops/s
* StringReplacementBenchmark.string_replaceAll:gc.alloc.rate thrpt 6 11391.346 ± 3790.917 MB/sec
*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add also String.replace(CharSequence, CharSequence) for completeness?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I'd overlooked that replace actually does a replace all, so I didn't realize it was equivalent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To my surprise, the Strings.replaceAll that implemented is actually still 20% faster than String.replace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: core Tracer core tag: performance Performance related changes type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants