Others have taken you behind the shed for this post, but you still seem to be clinging to your e-right to alway be correct, so here goes...
@amischiefr said:
@LordOfThePigs said:
Granted [b]this[/b] could have been made faster by using an array instead of a HashMap to [b]make the lookup trivial[/b], but that really doesn't make me want to cry out wtf.
Did you just suggest that they could use an Array over a HashMap for retrieval?
Yes he did say that. I've bolded some key parts that you overloooked. The word 'this' shows he is talking about an optimization for 'this' problem, and not making a general statement. The 'make the lookup trivial' is the real clue, in the context of an array that just about always means using an index.
You honestly believe that lookup is "faster" in an Array over a HashMap?
Maybe you should start reading posts before you reply to them.
Please go back to class and stop ditching Introduction to Programming 101 just to post on here.
I can deal with incorrect people, and I can deal with ass holes, but incorrect ass holes are the worst. Don't do it! If you're going to be an ass, make sure you are in the right. Otherwise, ask questions.
However his statement of "arrays are faster than hashmaps" is completely fucking retarded, and incorrect.
When you decide to quote someone, use their words. Someone skimming the thread might see that and get the (wrong) impression that LordOfThePigs is some retard that goes around replacing hash lookups with array scans to improve performance.
On the otherhand, if they saw:
However his statement of "Granted this could have been made faster by using an array instead of a HashMap to make the lookup trivial" is completely fucking retarded, and incorrect.
They would immediately know you were off your rocker.
If he has said "for this instance, using numbers 1 - 150 as indexes,
arrays will be faster" I wouldn't have said anything, but that isn't
what he said.
1. That is a ridiculous amount of detail to require in a forum that caters to programmers with a god complex.
2. You would have silently agreed with his post if he had posted an incorrect implementation? - a minute with google confirms the suspicion that the NES opcodes aren't 1 - 150.