Skip to content

abelbraaksma/StringLength-Optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

String.length optimization in FSharp.Core

Just a simple BenchMark test for a small optimization of String.length in F#. Previously, the function always called the System.String::Length method twice. It's now down to one call only. This optimization has already been merged into F#, see: dotnet/fsharp#9469.

Placing it here to check with @adamsitnik in BDN issue #1486 if it is possible to write a single benchmark in BDN that shows the timings against two different FSharp.Core.dlls, one for the original, and one for the locally built optimized version. If we can establish a way to do that, it'll be easier to check more complex optimizations that require changes in private functions, or involve compiler-specific syntax like inline IL with stuff like (# "ldlen.multi 2 0" array : int #) .

To make this work, we would somehow need to compile with/without DisableImplicitFSharpCoreReference.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages