This website requires JavaScript.
Explore
Help
Sign In
elf
/
rlocate
Watch
1
Star
0
Fork
You've already forked rlocate
0
Code
Issues
Pull Requests
Releases
Wiki
Activity
550d4c1876
rlocate
/
crates
/
squozen
/
src
/
lib.rs
6 lines
92 B
Rust
Raw
Normal View
History
Unescape
Escape
Moved everything around so it's more project-y Added the squozen patprep function, added unit tests to the patprep `c` code, and ensured that the rust version works the same way. The only remaining code slowdown is that re-allocating the Vec 50 million times turns out to be slower than re-using the same slice of RAM over and over and over.
2022-11-11 16:31:22 +00:00
// pub use crate::codesquoze;
Intermediate progress: Squozen I realized that the C version of this thing does multiple things in the same function: it loads the bigrams, it iterates through the database, and it compares the things found in the database to the prepared pattern. It seems to me, therefore, that we're better off with an instance that loads the bigrams, then closes the database immediately. Later, the client can ask for one of two iterators: one that either returns each entry in sequence, or one that returns each entry in sequence that matches the pattern passed in.
2022-11-27 00:49:25 +00:00
extern
crate
libc
;
Moved everything around so it's more project-y Added the squozen patprep function, added unit tests to the patprep `c` code, and ensured that the rust version works the same way. The only remaining code slowdown is that re-allocating the Vec 50 million times turns out to be slower than re-using the same slice of RAM over and over and over.
2022-11-11 16:31:22 +00:00
pub
mod
prepare_pattern
;
Intermediate progress: Squozen I realized that the C version of this thing does multiple things in the same function: it loads the bigrams, it iterates through the database, and it compares the things found in the database to the prepared pattern. It seems to me, therefore, that we're better off with an instance that loads the bigrams, then closes the database immediately. Later, the client can ask for one of two iterators: one that either returns each entry in sequence, or one that returns each entry in sequence that matches the pattern passed in.
2022-11-27 00:49:25 +00:00
pub
mod
squozen
;