Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚙️ STD optimization - make it be stored as parsed AST in the binary #170

Open
matejsmycka opened this issue Jun 10, 2024 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@matejsmycka
Copy link

Wouldn't amber std be more efficient if bash was used directly? Right now, std has to be parsed and compiled. Std in Amber would make sense if types were used, but unsafe untyped amber is not optimal. This is case with some of the functions in std lib.

@b1ek
Copy link
Member

b1ek commented Jun 11, 2024

it could be shipped precompiled with the binary if it takes too much time to compile it.

right now, it takes 22ms to compile this program:

import { input } from "std";
echo "hi, " + input("who r u: ") + "!!!"
$ time amber hi.ab hi.sh
amber hi.ab hi.sh  0.02s user 0.00s system 97% cpu 0.024 total

@Ph0enixKM
Copy link
Collaborator

It’s not a problem now, but you’re right this may lead to slower performance with time. Good issue

@Ph0enixKM Ph0enixKM changed the title std optimization suggestion ⚙️ STD optimization - make it be stored as parsed AST in the binary Jun 19, 2024
@Mte90 Mte90 added the enhancement New feature or request label Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants