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

Reduction of Sudoku output #46

Open
SpinTensor opened this issue Jan 5, 2024 · 3 comments
Open

Reduction of Sudoku output #46

SpinTensor opened this issue Jan 5, 2024 · 3 comments

Comments

@SpinTensor
Copy link
Contributor

All BMs give only a single number as output for validating the computational result, except the Sudoku one, which spits out the solved sudokus several times. This might slow down the program, as the computations might wait on the return of the print functions. Maybe this should be reduced to one of the Sudokus only, to better measure the computational time?

@attractivechaos
Copy link
Owner

Yes, good point. Sudoku is the only benchmark here that repeats the same input. I worry compiler might optimize key functions out if there is no outcome, so force the programs to output. Perhaps we may sum over the middle number (i.e. out[41]). I may try this at some point.

@nsajko
Copy link

nsajko commented Jan 6, 2024

I worry compiler might optimize key functions out if there is no outcome, so force the programs to output.

Writing to /dev/null seems like it would be a better option than printing.

@SpinTensor
Copy link
Contributor Author

Yes /dev/null helps because the frame-buffer of the terminal, or the filesystem does not need to answer to the program. I agree that the some output must be written, and preferably in a way that does not allow optimizations. I think the sum of a number from the sudoku would be good. Basically sum over out[41] for all 200 Sudokus. This way nothing can be dropped.

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

3 participants