Comments (6)
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.
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.
[deleted comment]
from markdownsharp.
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.
Normalize looks right to me.
Original comment by [email protected]
on 13 Jan 2010 at 12:34
from markdownsharp.
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)
- title element not escaped
- Problem with auto email links
- Add link to Pagedown on the project home page. HOT 1
- Allow to set base url for relative url
- URL detection bug for URLs that contain parentheses
- f3973492a27c breaks ConfigTest.TestEncodeProblemUrlCharacters
- Enable EmailEncoding as an option HOT 1
- <code> tags are rendered inside of <pre> for code blocks
- Add option to avoid Paragraph around single element
- Support Pandoc Extensions to Markdown
- Add Strikethrough
- Have the option to add a prettify class name to the <pre> tags
- URL: Support protcol-relative URLs
- Auto-URLs are breaking with any url that has an underscore HOT 1
- Strange <p> tag placement
- Unit test error: MarkdownSharpTests.ConfigTest.TestEncodeProblemUrlCharacters HOT 1
- AutoNewlines set through MarkdownOptions replaces EOL with <br instead of <br />
- Add SkipCodeBlocks Option HOT 1
- Migrate to GitHub! HOT 1
- Sponsor an official nuget package
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from markdownsharp.