Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I like how you guys print the number with this long ass tail of decimal digits as if this number is ultra exact 😄
-
@Lensflare They're decently accurate, but you're right time to move it to time_ns ;P
Also @12bitfloat, push your shit ;P (at least the linux executable so I can compare easily) but I still need to do what I want to do -
@BordedDev It's pushed already! I've also updated the makefile a bit so you only need to do `make build_all` and then `make benchmark` or `make benchmark_only` (to not unzip the books over and over)
-
@12bitfloat Can you at least push working code ;P
First the module error next the the code panicks ;P
thread '<unnamed>' (255814) panicked at src/main.rs:153:35:
index out of bounds: the len is 2735 but the index is 2735
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' (255838) panicked at src/main.rs:153:35:
index out of bounds: the len is 1909 but the index is 1909 -
yeah I can't even compile yours. it says file not found for module books. cuz the root .gitignore doesn't commit anything called books. gotta fix that first
-
@jestdotty I guess we have to consider that his code is still running and take his posting of the fixed code as his benchmark time ;P
-
@jestdotty @BordedDev hmm thats weird let me check
As for the panic... Yeah I think there's some UB in there :P Just compiler on release and nobody will notice ¯\_(ツ)_/¯ -
wtf thats so weird, why is books.rs not included... Git just straight up doesn't see it
-
@BordedDev Pushed it again... That root .gitignore was seriously messed up. Turns out `books` just matches ANY file and dir called books even recursively
I'm gonna fix the UB soon :P -
Jesus retoor's python lmao. I thought it froze
***benchmarking***
Time C: 2.680227041244507
Time Rust: 0.4405198097229004
Time CPP: 1.7431919574737549
Time Borded CPP: 2.1709747314453125
Time Jest Rust: 1.1724905967712402
Time Retoor Python: 72.42550039291382
***end benchmark***
thing is I'm always second slowest on retoor's machine -
@jestdotty Wth is going on with those numbers. I swear, this is what I get with `make build_all && make benchmark_only` (i've removed the python version):
***benchmarking***
Time C: 0.8568556308746338
Time Rust: 0.1031808853149414
Time CPP: 0.404313325881958
Time Borded CPP: 0.6591579914093018
Time Jest Rust: 0.30507850646972656
***end benchmark***
Final benchmark for now. I think I've invested (wasted :P) enough time optimizing this
Finally got it below 100 ms on my system:
***benchmarking***
Time C: 0.82965087890625
[src/main.rs:407:2] num_threads = 24
[src/main.rs:408:2] num_cores = 24
Time Rust: 0.09551429748535156
Time CPP: 0.4009711742401123
Time Borded CPP: 0.6333107948303223
Time Jest Rust: 0.28380441665649414
***end benchmark***
And ignore the two debug prints. For some god forsaken reason, removing them makes it slower by like 5% for..... reasons..... idk lol
rant