premature-optimization Questions

3

Solved

Due to the wonders of branch prediction, a binary search can be slower than a linear search through an array of integers. On a typical desktop processor, how big does that array have to get before ...
Houdon asked 14/8, 2009 at 1:57

13

Solved

Bit of a weird one: I was told a while ago by a friend that rearranging this example for loop from : for(int i = 0; i < constant; ++i) { // code... } to: for(int i = 0; constant > i; ++i...

2

Solved

As a corollary to this question I was wondering if there was good comparative studies I could consult and pass along about the advantages of using the RDMBS do the join optimization vs systematical...
Vanzandt asked 2/8, 2009 at 8:6

8

Solved

While updating for loops to for-each loops in our application, I came across a lot of these "patterns": for (int i = 0, n = a.length; i < n; i++) { ... } instead of for (int i = 0; i < a...
Becalm asked 30/7, 2009 at 18:9

4

Solved

I have some code i'm revewing, which is used to convert some text into an MD5 Hash. Works great. It's used to create an MD5Hhash for a gravatar avatar. Here it is :- static MD5CryptoServiceProvide...
Kellene asked 20/5, 2009 at 14:19

© 2022 - 2024 — McMap. All rights reserved.