Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ should_use_slice_optimization
Method
should_use_slice_optimization
crates/codegen/src/compile.rs:77–79 ·
view source on GitHub ↗
(&self)
Source
from the content-addressed store, hash-verified
75
}
76
77
fn should_use_slice_optimization(&self) -> bool {
78
!self.is_constant_slice() && matches!(self, ast::Expr::Slice(s) if s.step.is_none())
79
}
80
}
81
82
const MAXBLOCKS: usize = 20;
Callers
1
compile_subscript
Method · 0.80
Calls
1
is_constant_slice
Method · 0.80
Tested by
no test coverage detected