-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Milestone
Description
It seems there are some performance implications when using ..= in for loops. Our use case may be minor in byte-knight, but it's something we can fix to potentially help performance. I should also avoid using ..= in the future as well.
See:
- https://www.reddit.com/r/rust/comments/1byitat/exclusive_range_faster_than_inclusive_when/
- https://users.rust-lang.org/t/is-nim-faster-than-rust/137972/8
- https://rust.godbolt.org/z/aM1PPYc3e
rg output:
rg "\..="
tools\hce-tuner\src\tuner.rs
41: for epoch in 1..=self.max_epochs {
Makefile
12: NAME := $(shell powershell -Command "(Get-Content Cargo.toml | Select-String '^name =').Line -replace '.*= ', '' -replace '\"', ''")
13: VERSION := $(shell powershell -Command "(Get-Content Cargo.toml | Select-String '^version =').Line -replace '.*= ', '' -replace '\"', ''")
engine\src\history_table.rs
67: for rank in (0..=NumberOf::RANKS - 1).rev() {
chess\src\side.rs
104: for char in ('a'..='z').filter(|val| *val != 'w' && *val != 'b') {
chess\src\file.rs
153: for c in 'i'..='z' {
169: for i in 8..=u8::MAX {
chess\src\board.rs
821: for rank in (Rank::R3 as u8)..=(Rank::R6 as u8) {
822: for file in (File::A as u8)..=(File::H as u8) {Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels