Unable to load image

ADVENT OF CODE DAY 11: MONKEY BUSINESS :marseymonke:

Those FRICKING monkeys stole your stuff! Get it back! :soycry: :!marseymonke:

(Also, remember to leave a comment if you did something interesting :marseylove:)

35
Jump in the discussion.

No email address required.

butt : washed

did most of the obvious optimizations (thanks profiler) so it's down to 3.5 seconds of runtime

No, I will not use something other than a bajillion cell arrays

![](/images/16707454283486094.webp)

Jump in the discussion.

No email address required.

wat? my js runs in < 0.7.s for the full 10,000 cycles, and that's just how i wrote it ... wtf r u doing even?

Jump in the discussion.

No email address required.

It's probably just matlab jank, and maybe a poor choice of data structure since I'm not sure what are the fastest ones to use.

I'm not a programmer, just a scripter (for physics) so I just keep using high level languages (Matlab, python and some embedded C) because I don't want to bother with low level shit when I don't need it.

Jump in the discussion.

No email address required.

yeah low shit sucks, but js is about as far from low level as u can get.

but i'm surprised u wouldn't want to be experienced in basic algorithmic runtime complexity cause if ur doing simulations, that's going to determine speed of the simulation.

Jump in the discussion.

No email address required.

I do have some experience in complexity, it's just that I can't exactly do anything when the language just mostly sucks butt in pure speed, or I don't have the specific knowledge to optimize it. We only ever got into coding either very formally with the math behind complexity and proofs, or very liberally with what's basically the bare minimum to put the language on your CV.

We have no "real" CS class so I just gradually learn what is usually the fastest shit to use when I find info on it. Like a few months back I saw that the string to int conversions were horribly slow in matlab and tried shit until I stumbled upon remnants of C with sscanf, which does the job infinitely faster, and now I can't do without it.

Jump in the discussion.

No email address required.

Link copied to clipboard
Action successful!
Error, please refresh the page and try again.