Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Improve performance #109

Closed
h3rald opened this Issue May 3, 2010 · 2 comments

Comments

Projects
None yet
1 participant
Owner

h3rald commented May 3, 2010

Test and improve overall performance of Glyph processing and post-processing.

Owner

h3rald commented May 27, 2010

Implemented a new parser from scratch. Informal benchmarks show the following improvements:

  • Parsing is nearly 50x faster
  • Overall interpreting is nearly 11x faster

Old benchmark:

                                     user     system      total        real
 ============================================================================

  => Core Classes
 Glyph::Interpreter.new.parse    0.000000   0.000000   0.000000 (  0.000000)
 GlyphLanguageParser.parse       3.688000   0.016000   3.704000 (  3.708000)
 ============================================================================

  => Macro Set: Glyph
 ============================================================================

 section[...]                    3.406000   0.031000   3.437000 (  3.441000)
 snippet[...]                    0.094000   0.000000   0.094000 (  0.094000)
 textile[...]                    3.843000   0.141000   3.984000 (  4.004000)
 markdown[...]                   3.922000   0.062000   3.984000 (  4.020000)
 HTML text                       3.516000   0.016000   3.532000 (  3.566000)
 ============================================================================

 Markdown (BlueCloth)            0.515000   0.015000   0.530000 (  0.532000)
 Textile (RedCloth)              0.063000   0.000000   0.063000 (  0.063000)
 ============================================================================

  => Macro Set: XML
 HTML text                       3.516000   0.094000   3.610000 (  3.613000)

New benchmark:

                                     user     system      total        real
 ===========================================================================

  => Core Classes
 Glyph::Interpreter.new.parse    0.078000   0.000000   0.078000 (  0.078000)
 Glyph::Parser.new(text).parse   0.094000   0.000000   0.094000 (  0.094000)
 ===========================================================================

  => Macro Set: Glyph
 ===========================================================================

 section[...]                    0.094000   0.015000   0.109000 (  0.110000)
 snippet[...]                    0.109000   0.000000   0.109000 (  0.109000)
 textile[...]                    0.297000   0.188000   0.485000 (  0.485000)
 markdown[...]                   0.609000   0.109000   0.718000 (  0.720000)
 HTML text                       0.344000   0.063000   0.407000 (  0.406000)
 ===========================================================================

 Markdown (BlueCloth)            0.453000   0.000000   0.453000 (  0.454000)
 Textile (RedCloth)              0.047000   0.000000   0.047000 (  0.047000)
 ===========================================================================

  => Macro Set: XML
 HTML text                       0.250000   0.015000   0.265000 (  0.266000)
Owner

h3rald commented May 27, 2010

Closed by 2f129cc.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment