Skip to content

Review Neko to increase performance and reduce memory usage #60

@rschwietzke

Description

@rschwietzke

This is just a bookmark for my ongoing task of tuning without larger rewrites. So far, we got to this:

Wikipedia DE Homepage, DOM Parser, JDK 17, JDK 8 target

Old, v3.8.0

Benchmark                                               Mode  Cnt      Score     Error   Units
HtmlParser_v380_Benchmark.domParser                     avgt    3  1,596,511 ± 136,413   ns/op
HtmlParser_v380_Benchmark.domParser:gc.alloc.rate.norm  avgt    3  1,091,867 ±   1,868    B/op

New, JDK 8 target

Benchmark                                               Mode  Cnt      Score     Error   Units
HtmlParser_v380_Benchmark.domParser                     avgt    3  1,178,706 ± 130,720   ns/op
HtmlParser_v380_Benchmark.domParser:gc.alloc.rate.norm  avgt    3    870,992 ±       0    B/op

New, JDK 11 target

Benchmark                                               Mode  Cnt      Score     Error   Units
HtmlParser_v380_Benchmark.domParser                     avgt    3  1,165,087 ± 112,361   ns/op
HtmlParser_v380_Benchmark.domParser:gc.alloc.rate.norm  avgt    3    870,656 ±       0    B/op

Summary: 25% faster and 20% less memory is needed. There are 1-2% more performance in a JDK 11 compile than a JDK 8 one due to improvements of the JDK 11 code generation (no accessor methods for inner classes anymore).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions