Skip to content

Commit

Permalink
try 16_384
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Mar 25, 2024
1 parent b53f64a commit e284786
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/py_string_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pub fn cached_py_string<'py>(py: Python<'py>, raw_str: &str) -> Bound<'py, PyStr
// capacity should be a power of 2 so the compiler can convert `%` to a right shift below
// Using a smaller number here (e.g. 1024) seems to be faster in many cases than a larger number (like 65536)
// and also avoids stack overflow risks
const CAPACITY: usize = 1024;
const CAPACITY: usize = 16_384;
type Entry = Option<(u64, Py<PyString>)>;

/// This is a Fully associative cache with LRU replacement policy.
Expand Down

0 comments on commit e284786

Please sign in to comment.