Code Monkey home page Code Monkey logo

antlr4-runtime-benchmarks's Introduction

ANTLR4 Benchmarks

This repository consists of various benchmarks that can be used to measure the performance of certain ANTLR4 runtimes in conjunction with a selected grammar.

Benchmarks Structure

The benchmarks are organized in folders (located in the src directory), whose names correspond to the grammar that is tested in that subtree, or a descriptive name for artificial grammars that deal with specific aspects of ANTLR4 lexers and grammars. Each of these folders contains subfolders for each target. This way we have independent subprojects, each of which can be built and run independently.

Currently there's only one set of benchmarks: MySQL parser benchmarks (using the official MySQL grammar from Oracle). The plan is to add more over time.

There's an own readme file for each grammar, explaining the installation details and listing the latest results. The general idea for all benchmarks is to do only the absolute minimum to measure the time a script or binary needs to parse specific input for a given grammar. No third party (test/benchmark) libraries or anything not directly related to building a runnable parser should be involved, to maintain a low entry point for everyone interested in running the benchmarks on their own boxes.

It's not needed to measure times in micro seconds or even smaller time units, for a comparison. Instead the input should be complex enough to make a parser run more than just a few milliseconds.

Here's the list of the existing grammar benchmarks:

Runtime Prequisites

Most runtimes must be built first, so that the benchmarks can use them. This section explains details for each of them.

TypeScript

As a scripting language there's nothing you need to prepare. If you have Node.js installed you have everything you need for execution.

C++

The C++ benchmarks need the C++ runtime as a dynamic library. You can either provide one yourself (e.g. from other projects) and copy that to the /antlr4-cpp-runtime/lib folder. It must be named antlr4-runtime (plus the platform dependent extension like .so on Linux or .dylib on macOS) so that the build scripts can find it for linking.

Or you can use a build script from this project, which I plan to add a bit later.

antlr4-runtime-benchmarks's People

Contributors

mike-lischke avatar

Watchers

 avatar

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.