Giter Site home page Giter Site logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 25, 2024
excellent, checked in as r100 -- there is another opportunity to combine the 
_blankLines regex with this Normalize() routine as well, I think. But you'll 
have to 
use a line-oriented approach instead of the chunked way you're adding stuff to 
the 
stringbuilder now

Original comment by [email protected] on 12 Jan 2010 at 3:57

from markdownsharp.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 25, 2024
Ate the _blankLines regex as well.

Well, the chunked way did indeed get a bit cumbersome with all the cases in 
which 
stuff is added to the stringbuilder now ;)

Performance did improve, but not a lot:

Performance before changes:
input string length: 475
4000 iterations in 2642 ms (0,6605 ms per iteration)
input string length: 2356
1000 iterations in 2480 ms (2,48 ms per iteration)
input string length: 27737
100 iterations in 2740 ms (27,4 ms per iteration)
input string length: 11075
200 iterations in 2535 ms (12,675 ms per iteration)
input string length: 88607
30 iterations in 3090 ms (103 ms per iteration)
input string length: 354431
10 iterations in 4095 ms (409,5 ms per iteration)

Performance after changes:
input string length: 475
4000 iterations in 2597 ms (0,64925 ms per iteration)
input string length: 2356
1000 iterations in 2460 ms (2,46 ms per iteration)
input string length: 27737
100 iterations in 2709 ms (27,09 ms per iteration)
input string length: 11075
200 iterations in 2526 ms (12,63 ms per iteration)
input string length: 88607
30 iterations in 3056 ms (101,866666666667 ms per iteration)
input string length: 354431
10 iterations in 4044 ms (404,4 ms per iteration)


P.S.: Would you consider upping the default number of executions of especially 
the 
last 3 tests? They are done rather quickly otherwise ;)

Original comment by [email protected] on 12 Jan 2010 at 1:06

Attachments:

from markdownsharp.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 25, 2024
[deleted comment]

from markdownsharp.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 25, 2024
checked in as r102

I have to manually incorporate your .diff files by hand because they are not in 
a
format that Tortoise understands.. **I am not sure I got it right this time, 
can you
check?**

As for the benchmark, the last 3 benchmark calls are to measure the cost of 
calling
the whole thing once. The previous 3 benchmark calls are loops of many 
thousands. We
need both.

Original comment by [email protected] on 12 Jan 2010 at 10:56

from markdownsharp.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 25, 2024
Normalize looks right to me.

Original comment by [email protected] on 13 Jan 2010 at 12:34

from markdownsharp.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 25, 2024
ok, very good -- closing this as fixed them. Thanks again for the contribution!

Original comment by [email protected] on 13 Jan 2010 at 12:44

  • Changed state: Fixed

from markdownsharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.