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

Update to use the Dart Sass binary and the new v2 protocol #17

Merged
merged 2 commits into from Jun 8, 2023

Conversation

bep
Copy link
Owner

@bep bep commented Jun 8, 2023

E.g. use sass --embedded.

Note taht this will bumb to a new major version of this library (v2).

If you need to support the old protocol/binary, use the v1 (root path) version.

name                             old time/op    new time/op    delta
Transpiler/SCSS-10                  114µs ± 0%     145µs ± 1%  +26.40%  (p=0.029 n=4+4)
Transpiler/Start_and_Execute-10    25.6ms ± 2%    26.0ms ± 3%     ~     (p=0.486 n=4+4)
Transpiler/SCSS_Parallel-10        89.0µs ± 2%    44.4µs ± 3%  -50.12%  (p=0.029 n=4+4)

name                             old alloc/op   new alloc/op   delta
Transpiler/SCSS-10                 1.33kB ± 1%    1.33kB ± 0%     ~     (p=1.000 n=4+4)
Transpiler/Start_and_Execute-10    22.4kB ± 1%    22.4kB ± 1%     ~     (p=0.886 n=4+4)
Transpiler/SCSS_Parallel-10        1.34kB ± 3%    1.33kB ± 1%     ~     (p=1.000 n=4+4)

name                             old allocs/op  new allocs/op  delta
Transpiler/SCSS-10                   18.0 ± 0%      18.0 ± 0%     ~     (all equal)
Transpiler/Start_and_Execute-10       144 ± 1%       150 ± 0%   +4.16%  (p=0.029 n=4+4)
Transpiler/SCSS_Parallel-10          18.0 ± 0%      18.0 ± 0%     ~     (all equal)

See gohugoio/hugo#11059
Fixes #15

@bep bep force-pushed the feat/newdartbin-15 branch 14 times, most recently from 2b44e79 to 2b2a243 Compare June 8, 2023 10:17
E.g. use `sass --embedded`.

Note taht this will bumb to a new major version of this library (v2).

If you need to support the old protocol/binary, use the v1 (root path) version.

It seems to be twice as fast when running in parallel, but slightly slower serialized:

```bash
name                             old time/op    new time/op    delta
Transpiler/SCSS-10                  114µs ± 0%     145µs ± 1%  +26.40%  (p=0.029 n=4+4)
Transpiler/Start_and_Execute-10    25.6ms ± 2%    26.0ms ± 3%     ~     (p=0.486 n=4+4)
Transpiler/SCSS_Parallel-10        89.0µs ± 2%    44.4µs ± 3%  -50.12%  (p=0.029 n=4+4)

name                             old alloc/op   new alloc/op   delta
Transpiler/SCSS-10                 1.33kB ± 1%    1.33kB ± 0%     ~     (p=1.000 n=4+4)
Transpiler/Start_and_Execute-10    22.4kB ± 1%    22.4kB ± 1%     ~     (p=0.886 n=4+4)
Transpiler/SCSS_Parallel-10        1.34kB ± 3%    1.33kB ± 1%     ~     (p=1.000 n=4+4)

name                             old allocs/op  new allocs/op  delta
Transpiler/SCSS-10                   18.0 ± 0%      18.0 ± 0%     ~     (all equal)
Transpiler/Start_and_Execute-10       144 ± 1%       150 ± 0%   +4.16%  (p=0.029 n=4+4)
Transpiler/SCSS_Parallel-10          18.0 ± 0%      18.0 ± 0%     ~     (all equal)
```

See gohugoio/hugo#11059
Fixes #15
@bep bep force-pushed the feat/newdartbin-15 branch 2 times, most recently from f253ca5 to 98d17bb Compare June 8, 2023 12:29
@bep bep marked this pull request as ready for review June 8, 2023 12:35
@bep bep merged commit e584a3c into main Jun 8, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Executeable file renamed
1 participant