Php-parser: Improve tests & performance from latest release

Created on 5 Nov 2017  Â·  2Comments  Â·  Source: glayzzle/php-parser

Issue initialized here : https://github.com/glayzzle/php-parser/pull/94

  • [x] Should improve coverage on latest 2.1.0 release
  • [x] Should improve performance by checking is('IDENTIFIER') at last
  • [x] Add a performance indicator test
bug enhancement PARSER

Most helpful comment

Seems to be an overall boost :sparkles: :fireworks: :+1:

New test takes 498sec to parse 48200 files :
https://travis-ci.org/glayzzle/php-parser-dev/builds/297672428#L889

From v2.1.0 it takes 620 sec :
https://travis-ci.org/glayzzle/php-parser-dev/builds/295681042#L896

And latest 2.0.7 takes 892 sec :
https://travis-ci.org/glayzzle/php-parser-dev/builds/271363662#L1290

May not run on same machine with same frequency, and may share CPU with other builds, so I can't conclude that's fully on code optimisation...

All 2 comments

Start a generic test, does not covers everything but can indicate if some generic behaviour becomes slower. Here my actual results, based on my virtual machine

  Performance tests
    + Tokens speed  => 1.13M/sec
    + Reading speed => 2.18M/sec
    ✓ tokenizer (118ms)
    + Nodes speed  => 137.58K/sec
    + Overall speed => 880.01K/sec
    ✓ parser (293ms)

Seems to be an overall boost :sparkles: :fireworks: :+1:

New test takes 498sec to parse 48200 files :
https://travis-ci.org/glayzzle/php-parser-dev/builds/297672428#L889

From v2.1.0 it takes 620 sec :
https://travis-ci.org/glayzzle/php-parser-dev/builds/295681042#L896

And latest 2.0.7 takes 892 sec :
https://travis-ci.org/glayzzle/php-parser-dev/builds/271363662#L1290

May not run on same machine with same frequency, and may share CPU with other builds, so I can't conclude that's fully on code optimisation...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexander-akait picture alexander-akait  Â·  8Comments

alexander-akait picture alexander-akait  Â·  3Comments

chris-l picture chris-l  Â·  7Comments

alexander-akait picture alexander-akait  Â·  7Comments

alexander-akait picture alexander-akait  Â·  9Comments