Code Monkey home page Code Monkey logo

parser_benchmarks's People

Contributors

bryce-anderson avatar codas avatar dsemi avatar dtolnay avatar ebkalderon avatar flip111 avatar geal avatar hadronized avatar hywan avatar m4rw3r avatar marwes avatar michaelmior avatar traviscross avatar unrealquester avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

parser_benchmarks's Issues

Add pom benchmarks

It would be nice to add some benchmarks for pom, a PEG parser combinator library similar to nom that eschews macros in favor of regular Rust functions and operator overloading. It would be interesting to see how well it stacks up against the other libraries.

I would be happy to try to port the upstream JSON (u8) and JSON (char) pom examples as benchmarks, but I'm not sure how I am supposed to benchmark and render the results into Markdown. Any help on how to do this reliably and reproducibly would be appreciated.

Use a faster hash function to put more emphasis on parsing

The json comparisons currently use HashMap with the standard library's default (collision-resistant) hash function. A comparatively large amount of time in those benchmarks is spent hashing rather than parsing. Considering that this project is intended to be a comparison of parsing libraries, it would be good to use a quicker hash function like fnv in those hashmaps.

nom optimized build errors

with stable rustc 1.33.0

error[E0554]: #![feature] may not be used on the stable release channel
 --> src/main.rs:1:1
  |
1 | #![feature(const_fn)]
  | ^^^^^^^^^^^^^^^^^^^^^

error[E0554]: #![feature] may not be used on the stable release channel
 --> src/main.rs:2:1
  |
2 | #![feature(cfg_target_feature, target_feature, stdsimd)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

with version 1.34.0-nightly (c1d2d83ca 2019-03-01)

error[E0019]: constant function contains unimplemented expression type
   --> src/combinators.rs:245:12
    |
245 |     return c == '\t' as u8 || (c > 31 && c != 127);
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0019]: constant function contains unimplemented expression type
   --> src/combinators.rs:251:14
    |
251 |     return !(c <= 32 || c >= 127 || c == '(' as u8 || c == ')' as u8 || c == '<' as u8
    |              ^^^^^^^^^^^^^^^^^^^

HTTP test results seem a bit old? off?

I benched everything on my PC, i get the following results. I compared it to the intel CPU (i think this is the one in the macbook).

The attoparsec bench is done with the code in #24

combine-http and attoparsec have big differences. I would also be interested to see the results with the current code on the macbook. I'm surprised by the 87.17% to 142% swing in the results, i didn't think the architecture of the CPU would matter that much.

compare

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.