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

adding free points from CindyScript does not invoke the prover #895

Merged
merged 1 commit into from
Nov 2, 2022

Conversation

kortenkamp
Copy link
Member

When adding elements using the createpoint(…) function, the prover does not need to be invoked. However, it was, leading to a quadratic runtime when adding n points. I tried to fix this by invoking addElementNoProof instead of addElement, but this still had quadratic runtime as the conjectures comparing the new element to all other elements are created in the addElementNoProof code.

This pull request changes the behaviour of addElementNoProof to match its name – conjectures are only created when the prover is invoked, and also uses addElementNoProof for the createpoint(…) function.

An example illustrating the now instant creation of 999 elements has been added as well, the Stellenwerttafel. Add a point in the first column and then drag it to the rightmost column to create 999 elements. This took about 5-15 seconds, depending on the computer/tablet you used, and is now immediate.

This closes #894.

@kortenkamp
Copy link
Member Author

Merging this as an emergency fix – Stellenwerttafel is being used today at a lecture in Dresden.

@kortenkamp kortenkamp merged commit 412441a into main Nov 2, 2022
@kortenkamp kortenkamp deleted the kortenkamp/fastInsertElements branch November 2, 2022 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

createpoint is slow
1 participant