MCPcopy 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
82const MAXBLOCKS: usize = 20;

Callers 1

compile_subscriptMethod · 0.80

Calls 1

is_constant_sliceMethod · 0.80

Tested by

no test coverage detected