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

word-unit composition is slow #178

Open
uncomputable opened this issue Nov 6, 2023 · 0 comments
Open

word-unit composition is slow #178

uncomputable opened this issue Nov 6, 2023 · 0 comments

Comments

@uncomputable
Copy link
Collaborator

The following program takes minutes to finalize on my machine. It is taken from the Simplicity test vectors, also found in the asset generator.

rust-simplicity is not meant to be as fast as C-simplicity, but it seems strange that a simple program like this takes so long.

use simplicity::jet::Core;
use simplicity::node::{CoreConstructible};
use simplicity::{Value, WitnessNode};

let mut word = Value::u8(0x00);
for _ in 0..20 {
    word = Value::prod(word.clone(), word.clone());
}

// FIXME: Finalizing this program takes a long time
let program = Arc::<WitnessNode<Core>>::comp(
    &Arc::<WitnessNode<Core>>::const_word(word),
    &Arc::<WitnessNode<Core>>::unit(),
)
.unwrap()
.finalize()
.unwrap();
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

No branches or pull requests

1 participant