upvote
That depends on what end ends. For a small N, very bad algorithms can still be plenty fast. Sometimes it can even be faster. Some of your lower O algorithms can have very terrible constant factors, which means they're terrible when N is small, but as N gets large.

Big and small N different for different algorithms and hardware both.

reply
Totally agree, but I'm in Java land and cursed to have about the worst case scenario for those things :D
reply
Oh yeah I'm also mostly in Java land. These concerns are also concerns in Java, plus whatever C2 gets up to.
reply
Valhalla can't come soon enough.

I've definitely had to change things into SOA in order to eke out performance. My coworkers aren't thrilled seeing `double[] x; double[] y;` but that really is about the only way to get the JVM to play nice.

reply