MortenHoustonLudvigsen / CommonMarkSharp

A CommonMark parser for .Net
MIT License
12 stars 2 forks source link

Strange performance drop when running 10000 iterations #2

Open Knagis opened 10 years ago

Knagis commented 10 years ago

See the newest version of my benchmark tool. Once I upped the # of iterations to 10000, CommonMarkSharp experienced a huge drop in performance for small inputs (as large as 5 sec vs 500ms). Of course it is still ~0.5ms per iteration but its 10x faster when the number of iterations is 2000 so something strange is going on...

empty.text    12 B   (10000 iterations)

             Library    Total   Each   vs Baseline
--------------------------------------------------
            Baseline      529      0   100%
      CommonMark.NET      243      0   46%
     CommonMarkSharp     5467      1   1033%
       MarkdownSharp      582      0   110%
        MarkdownDeep      269      0   51%
MortenHoustonLudvigsen commented 10 years ago

Hmm... that doesn't sound good. Thanks!