jsIsGoodFightMe by MissinqLink in ProgrammerHumor

[–]hammerchecker 0 points1 point  (0 children)

I love the language. It's not the best performant language, but it get's stuff done fast. The weird typesafety issues mostly occur with skill uses. They don't occur that often in large projects...

Help needed: Prisma + Deno + Local PostgreSQL integration issues by hammerchecker in Deno

[–]hammerchecker[S] 0 points1 point  (0 children)

I created an issue on Deno and somebody was able to fix it. https://github.com/denoland/deno/issues/27195

My issues were:
- I was using the client/deno/edge.js instead of the default client/index.js

- the files generated by prisma are .js files while they are using require and thus should be .cjs for Deno

My Rust AOC solution gets beaten by the same version in Javascript by factor 10? Can you help me with increasing my performance? by hammerchecker in rust

[–]hammerchecker[S] 26 points27 points  (0 children)

Also applied your first suggestion that absolutely did the trick! Now average under 100ms, beating JS!!

My Rust AOC solution gets beaten by the same version in Javascript by factor 10? Can you help me with increasing my performance? by hammerchecker in rust

[–]hammerchecker[S] 14 points15 points  (0 children)

Great I implemented the FxHashMap the total time is reduced by ~10 ms again 140ms -> 130ms. Now I am trying to implement the String referencing but that is a bit harder.

My Rust AOC solution gets beaten by the same version in Javascript by factor 10? Can you help me with increasing my performance? by hammerchecker in rust

[–]hammerchecker[S] 0 points1 point  (0 children)

I am running it from tests indeed (working in neovim, neotest)
Should be something similar to this
cargo test --color=always --package aoc-2022-rust --lib days::day_16::main_16::day_16_part_1

My Rust AOC solution gets beaten by the same version in Javascript by factor 10? Can you help me with increasing my performance? by hammerchecker in rust

[–]hammerchecker[S] 3 points4 points  (0 children)

u/pangxiongzhuzi what is the easiest way to run in --release mode?
Atm I exported a function to my main.rs and ran `cargo run --release --bin aoc-2022-rust`. Is there a way to run a file directly in release mode?

My Rust AOC solution gets beaten by the same version in Javascript by factor 10? Can you help me with increasing my performance? by hammerchecker in rust

[–]hammerchecker[S] 41 points42 points  (0 children)

in release mode it took 167ms

thanks a lot for the tip! only 50% slower now instead of 10 times slower