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

Remove unused return type from propagate() #4708

Closed

Conversation

mstembera
Copy link
Contributor

@mstembera mstembera commented Jul 25, 2023

Remove unused return type from propagate()
Make two AffineTransform and AffineTransformSparseInput static methods constexpr
No functional change
bench: 1601764

Make two AffineTransform and AffineTransformSparseInput static methods constexpr.
No functional change
bench: 1601764
@snicolet
Copy link
Member

Looks good to me.

Any speed measurement for the impact of the constexpr?

@Torom
Copy link
Contributor

Torom commented Jul 25, 2023

ARCH=x86-64-bmi2 COMP=clang

Result of  50 runs
==================
base (...es/stockfish) =    1055354  +/- 4079
test (...pagateReturn) =    1057386  +/- 3494
diff                   =      +2032  +/- 6834

speedup        = +0.0019
P(speedup > 0) =  0.7197

CPU: 4 x Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
Hyperthreading: on

@mstembera
Copy link
Contributor Author

Thanks. There should be no speed difference because the static get_index methods only get called at startup to load the weights. I mostly made them constexpr just because they can be and for consistency with the other static get_hash_value() method right above.

@snicolet snicolet added the to be merged Will be merged shortly label Jul 27, 2023
@snicolet snicolet closed this in cb22520 Jul 28, 2023
@snicolet
Copy link
Member

merged via cb22520, thanks!

Joachim26 pushed a commit to Joachim26/StockfishNPS that referenced this pull request Aug 15, 2023
Also make two get_weight_index() static methods constexpr, for
consistency with the other static get_hash_value() method right above.
Tested for speed by user Torom (thanks).

closes official-stockfish#4708

No functional change
Joachim26 pushed a commit to Joachim26/StockfishNPS that referenced this pull request Oct 17, 2023
Also make two get_weight_index() static methods constexpr, for
consistency with the other static get_hash_value() method right above.
Tested for speed by user Torom (thanks).

closes official-stockfish#4708

No functional change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to be merged Will be merged shortly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants