sdlite 1.3.0
Small and fast range based SDLang parser/generator
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
SDLite - a lightweight SDLang parser/generator
This library implements a small and efficient parser/generator for SDLang documents, providing a range based API. While the parser still uses the GC to allocate identifiers, strings etc., it uses a very efficient pool based allocation scheme that has very low computation and memory overhead.
Project origins
The motivation for writing another SDLang implementation for D came from the high overhead that the original sdlang-d implementation has. Parsing a particular 200 MB file took well over 30 seconds and used up almost 10GB of memory if parsed into a DOM. The following changes to the parsing approach brought the parsing time down to around 2.5 seconds:
- Using a more efficient allocation scheme
- Using only "native" range implementations instead of the more comfortable fiber-based approach taken by sdlang-d
- Using
TaggedUnion
(taggedalgebraic) instead ofVariant
Further substantial improvements at this point are more difficult and likely require the use of bit-level tricks and SIMD for speeding up the lexer, as well as exploiting the properties of pure array inputs.
- 1.3.0 released 3 months ago
- s-ludwig/sdlite
- MIT
- Copyright © 2019, Sönke Ludwig
- Dependencies:
- taggedalgebraic
- Versions:
-
1.3.1 2024-Dec-06 1.3.0 2024-Sep-13 1.2.0 2023-Jun-16 1.1.2 2021-May-20 1.1.1 2020-Oct-23 - Download Stats:
-
-
6 downloads today
-
44 downloads this week
-
266 downloads this month
-
6587 downloads total
-
- Score:
- 3.8
- Short URL:
- sdlite.dub.pm