amber-lang / amber-lang/amber

[Feature] Ship preparsed stdlib

Aberta
#524 1 comentário 0 reações 0 responsáveis Ver no GitHub
compiler enhancement stdlib
Linguagem predominante
Rust
Estrelas
5.2k
Forks
145
Merge médio
5d 3h
PRs com merge (30d)
7

Descrição

**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

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.