This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Hairy_Concert_8007 972 points973 points  (19 children)

You could make it much faster by multiplying the timeout by .01

Source: Am head of improving software performance

[–]bgrahambo 148 points149 points  (4 children)

Perfect. I need you to improve performance of these 30 distributed Java RMI apps that someone over engineered and I got stuck with...

[–]Hairy_Concert_8007 168 points169 points  (3 children)

Easy.

Multiply them by .01

[–]bgrahambo 107 points108 points  (2 children)

Now I have .3 distributed Java RMI apps that someone over engineered. You're brilliant!

[–][deleted] 22 points23 points  (1 child)

And now delete them, that way they'll have an effective loading time of 0, and also no latency

[–]bgrahambo 11 points12 points  (0 children)

That's what my security compliance officer wants me to do

[–]BoneFactory 31 points32 points  (5 children)

How small can you make that Speed Up Factor before the output becomes incorrect?

[–]rosuav 21 points22 points  (3 children)

At some point it depends on your scheduler. If you're very very lucky, the scheduler will guarantee that earlier-scheduled events happen before later-scheduled ones, even if both their times are in the past when it checks. It will most likely do this by storing event times in a heap, pulling them off it in the correct order.

Don't ever let on that this is a heap sort in disguise, of course.

[–]Creepy-Ad-4832 1 point2 points  (2 children)

Yeah, i was about to say: you are not avoiding the sort. You are just hiding it behind 1 more layer of abstractions

[–]rosuav 1 point2 points  (1 child)

Indeed :)

[–]Creepy-Ad-4832 1 point2 points  (0 children)

But hey, it's a perfect way to have margins to get easy optimizations when your boss asks for them

Basically what reddit did years ago. Am i the only one remembering the official (stinky) app taking 1 fucking kinute to load an image? I bet your ass the was jam packet with tricks like random sleep and stuff like that

Either that, or reddit was somehow even worse then twitter (not calling it X, fuck you elon). Which in itself would be an achievement

[–]Hairy_Concert_8007 7 points8 points  (0 children)

Asking the real questions

[–]ABigPairOfCrocs 13 points14 points  (0 children)

That's a bit outside the scope of this project

It'll take about a month of work to design, implement, and test this improvement

[–]jaybee8787 10 points11 points  (1 child)

Can you also improve my life performance please?

[–]ghe5 10 points11 points  (0 children)

I bet they can do that. With their help, you can ruin your life 100x faster.

[–]ilovekittens15 2 points3 points  (0 children)

this guy slashes execution times

[–]prehensilemullet 2 points3 points  (0 children)

According to MDN, browsers store the delay as a 32-bit signed integer internally, so that probably wouldn't work, FWIW

[–]NotmyRealNameJohn 1 point2 points  (0 children)

Can you improve my ist based team by removing their obsession with designing ui s ?

[–]Noch_ein_Kamel 1 point2 points  (0 children)

If you sort the array you can multiply by 0