Skip to content

Improvement in ToBoolean StringExtensions#789

Merged
tonyredondo merged 2 commits into
masterfrom
tony/stringtobool
Jul 8, 2020
Merged

Improvement in ToBoolean StringExtensions#789
tonyredondo merged 2 commits into
masterfrom
tony/stringtobool

Conversation

@tonyredondo

@tonyredondo tonyredondo commented Jul 7, 2020

Copy link
Copy Markdown
Member
  • Changes in the method documentation.
  • Performance and allocations improvements.
BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19041.329 (2004/?/20H1)
Intel Core i7-1068NG7 CPU 2.30GHz, 1 CPU, 2 logical and 2 physical cores
.NET Core SDK=3.1.301
  [Host]        : .NET Core 3.1.5 (CoreCLR 4.700.20.26901, CoreFX 4.700.20.27001), X64 RyuJIT
  .NET 4.7.2    : .NET Framework 4.8 (4.8.4180.0), X64 RyuJIT
  .NET Core 3.1 : .NET Core 3.1.5 (CoreCLR 4.700.20.26901, CoreFX 4.700.20.27001), X64 RyuJIT

Method Job Runtime Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
MatchOldSingleChar .NET 4.7.2 .NET 4.7.2 55.439 ns 1.4445 ns 4.1908 ns 0.0076 - - 32 B
MatchNewSingleChar .NET 4.7.2 .NET 4.7.2 5.353 ns 0.1361 ns 0.1512 ns - - - -
NotMatchOldSingleChar .NET 4.7.2 .NET 4.7.2 47.954 ns 0.7696 ns 0.6427 ns 0.0076 - - 32 B
NotMatchNewSingleChar .NET 4.7.2 .NET 4.7.2 5.527 ns 0.0837 ns 0.0742 ns - - - -
MatchOldString .NET 4.7.2 .NET 4.7.2 55.651 ns 1.0918 ns 1.2997 ns 0.0076 - - 32 B
MatchNewString .NET 4.7.2 .NET 4.7.2 14.719 ns 0.1993 ns 0.1767 ns - - - -
NotMatchOldString .NET 4.7.2 .NET 4.7.2 54.166 ns 0.8966 ns 0.8387 ns 0.0095 - - 40 B
NotMatchNewString .NET 4.7.2 .NET 4.7.2 21.097 ns 0.4389 ns 0.4696 ns - - - -
MatchOldSingleChar .NET Core 3.1 .NET Core 3.1 24.424 ns 0.4487 ns 0.4197 ns 0.0057 - - 24 B
MatchNewSingleChar .NET Core 3.1 .NET Core 3.1 5.381 ns 0.1208 ns 0.2269 ns - - - -
NotMatchOldSingleChar .NET Core 3.1 .NET Core 3.1 19.606 ns 0.4184 ns 0.6875 ns 0.0057 - - 24 B
NotMatchNewSingleChar .NET Core 3.1 .NET Core 3.1 5.619 ns 0.1320 ns 0.1102 ns - - - -
MatchOldString .NET Core 3.1 .NET Core 3.1 29.459 ns 0.5760 ns 0.5657 ns 0.0076 - - 32 B
MatchNewString .NET Core 3.1 .NET Core 3.1 11.998 ns 0.2627 ns 0.4090 ns - - - -
NotMatchOldString .NET Core 3.1 .NET Core 3.1 23.733 ns 0.5007 ns 0.6333 ns 0.0076 - - 32 B
NotMatchNewString .NET Core 3.1 .NET Core 3.1 18.984 ns 0.4084 ns 0.4370 ns - - - -

Comment thread src/Datadog.Trace/ExtensionMethods/StringExtensions.cs Outdated
@tonyredondo tonyredondo self-assigned this Jul 7, 2020

@kevingosse kevingosse left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@tonyredondo
tonyredondo marked this pull request as ready for review July 7, 2020 15:14
@tonyredondo
tonyredondo requested a review from a team as a code owner July 7, 2020 15:14
Comment thread src/Datadog.Trace/ExtensionMethods/StringExtensions.cs
@tonyredondo
tonyredondo merged commit 46701a4 into master Jul 8, 2020
@tonyredondo
tonyredondo deleted the tony/stringtobool branch July 8, 2020 08:02
@zacharycmontoya zacharycmontoya added this to the 1.18.2 milestone Jul 9, 2020
@lucaspimentel lucaspimentel added type:enhancement Improvement to an existing feature type:performance Performance, speed, latency, resource usage (CPU, memory) and removed type:enhancement Improvement to an existing feature labels Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:performance Performance, speed, latency, resource usage (CPU, memory)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants