amber-lang / amber-lang/amber

[Feature] Ship preparsed stdlib

Offen
#524 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
compiler enhancement stdlib
Vorherrschende Sprache
Rust
Sterne
5.2k
Forks
145
Ø Merge
5 T. 3 Std.
Gemergte PRs (30 T.)
7

Beschreibung

**Is your feature request related to a problem? Please describe.**
this is mainly to speed up performance in debug mode, but it will optimize away some milliseconds in production:

```
[Tokenize] in 1ms std/array
[Tokenize] in 10ms std/date
[Tokenize] in 15ms std/env
[Tokenize] in 3ms std/fs
[Tokenize] in 17ms std/text
[Tokenize] in 1ms std/http
[Tokenize] in 1ms std/math
∑ 48ms
```

the development unoptimized build is totally unreasonable:
```
[Tokenize] in 9ms test.ab
[Tokenize] in 177ms std/array
[Tokenize] in 2733ms std/date
[Tokenize] in 4739ms std/env
[Tokenize] in 692ms std/fs
[Tokenize] in 6578ms std/text
[Tokenize] in 155ms std/http
[Tokenize] in 182ms std/math
∑ 15.2s
```

**Describe the solution you'd like**
pretokenize stdlib before compiling it in

probably will require to split away the compiler from cli, i dont think there is a way to use regular rust code in macros or from the same crate in build.rs

**Additional context**
definetely will require amber-lang/heraclitus#66

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.