4

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

Comments
  • 5
    I like how you guys print the number with this long ass tail of decimal digits as if this number is ultra exact 😄
  • 3
    @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
  • 2
    @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)
  • 2
    @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
  • 2
    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
  • 2
    @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
  • 1
    @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 ¯\_(ツ)_/¯
  • 1
    wtf thats so weird, why is books.rs not included... Git just straight up doesn't see it
  • 2
    @12bitfloat You can't compile on release ;P (I'm using the benchmark make)
  • 2
    @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
  • 2
    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
  • 1
    @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***
Add Comment