skywind3000 / czmod Goto Github PK
View Code? Open in Web Editor NEW:rocket: Native Module Written in C to Boost z.lua !!
License: MIT License
:rocket: Native Module Written in C to Boost z.lua !!
License: MIT License
MacOS do not have complie tool musl-gcc
So I try use gcc, but compile failed.
Could you tell me how to build on MacOS system? Thanks
Please remove this information from your README, as it is incorrect.
You have done your benchmarking with an empty database. However, this does not reflect a real world use case, where the average user would be expected to have around 500 entries in his/her database. I've written a script to populate both zoxide
and z.lua
databases, and it can be seen that zoxide
runs 5x faster than czmod
.
Here is the script:
#!/usr/bin/env bash
rm ~/.zo ~/.zo.tmp ~/.zlua
for i in {1..500}; do
dirname="/tmp/test$i"
mkdir -p "$dirname"
~/git/zoxide/target/x86_64-unknown-linux-musl/release/zoxide add "$dirname"
~/git/czmod/czmod --add "$dirname"
done
Now if I run hyperfine
on my machine:
$ hyperfine '~/ws/zoxide/target/x86_64-unknown-linux-musl/release/zoxide
query test' '~/git/czmod/czmod -e test' --warmup 5000 --min-runs 5000
This is what I get:
Benchmark #1: ~/ws/zoxide/target/x86_64-unknown-linux-musl/release/zoxide query test
Time (mean ± σ): 0.4 ms ± 0.4 ms [User: 0.6 ms, System: 0.3 ms]
Range (min … max): 0.0 ms … 5.2 ms 5000 runs
Warning: Command took less than 5 ms to complete. Results might be inaccurate.
Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
Benchmark #2: ~/git/czmod/czmod -e test
Time (mean ± σ): 2.2 ms ± 0.4 ms [User: 2.3 ms, System: 0.2 ms]
Range (min … max): 1.8 ms … 7.0 ms 5000 runs
Warning: Command took less than 5 ms to complete. Results might be inaccurate.
Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
Summary
'~/ws/zoxide/target/x86_64-unknown-linux-musl/release/zoxide query test' ran
5.01 ± 5.08 times faster than '~/git/czmod/czmod -e test'
I tried to benchmark DB additions, but we have to first set _ZO_MAXAGE
and _ZL_MAXAGE
to a large number to ensure that all the other entries don't get deleted. However, czmod
doesn't seem to follow _ZL_MAXAGE
, so I was unable to test this.
I would have liked to test this on another machine, but unfortunately, I only have access to one at the moment. @cole-h, would you be able to do this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.