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

Construction syntax is slower than classic make construction #2509

Open
Oldes opened this issue Jul 30, 2022 · 0 comments
Open

Construction syntax is slower than classic make construction #2509

Oldes opened this issue Jul 30, 2022 · 0 comments

Comments

@Oldes
Copy link
Owner

Oldes commented Jul 30, 2022

I found, that I'm not able to use construction syntax in Rebol's boot code, so I had to revert recent mold bitset! change in commit: Oldes/Rebol3@7644bee

Meanwhile I noticed, that the construction syntax is actually slower to load than using make call.

>> profile [ [transcode to binary! {#[bitset! #{0000}]}]  [transcode to binary! {make bitset! #{0000}}] ]

Running 2 code blocks 10 times.
------------------------------------------------------------------------------------------------------------- 
Time               | Evals  | S.made | S.expa | Memory      | Code
1.0x (3μs)         | 3      | 4      | 1      | 200         | [transcode to binary! "make bitset! #{0000}"]
2.1x (6μs)         | 3      | 6      | 1      | 240         | [transcode to binary! "#[bitset! #{0000}]"]
-------------------------------------------------------------------------------------------------------------

I think that the result should be opposite - the construction syntax should be faster. And as a bonus, it should be possible to have it in the boot code!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant