From 729296de2b8a372ebd2684199386b783220b3052 Mon Sep 17 00:00:00 2001 From: Tristan Hume Date: Wed, 8 Jun 2016 17:43:39 -0400 Subject: [PATCH] Add benchmarks --- Readme.md | 16 ++++++++++++++++ benches/highlighting.rs | 34 ++++++++++++++++++++++++++++++++++ benches/loading.rs | 15 +++++++++++++++ src/yaml_load.rs | 17 +++++++++++------ 4 files changed, 76 insertions(+), 6 deletions(-) create mode 100644 benches/highlighting.rs create mode 100644 benches/loading.rs diff --git a/Readme.md b/Readme.md index 9bcfa0ad..939132b5 100644 --- a/Readme.md +++ b/Readme.md @@ -11,6 +11,7 @@ It is currently mostly complete and can parse, interpret and highlight based on - Work with many languages (accomplished through using existing grammar formats) - Be super fast - API that is both easy to use, and allows use in fancy text editors with piece tables and incremental re-highlighting and the like +- Expose internals of the parsing process so text editors can do things like cache parse states and use semantic info for code intelligence - High quality highlighting, supporting things like heredocs and complex syntaxes (like Rust's). ## Screenshots @@ -35,6 +36,21 @@ There's currently an example program called `syncat` that prints one of the sour - [ ] Make it really fast (mosty two hot-paths need caching, same places Textmate 2 caches) - [ ] Add C bindings so it can be used as a C library from other languages. +## Performance + +Currently `syntect` is reasonably fast but not as fast as it could be. The following perf features are done and to-be-done: +- [x] Pre-link references between languages (e.g `