Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

cnstrnd

Nearest power of 2

This topic is 5600 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Quote:
Original post by Thomas_CR
I am sorry, but as you see, DD3 has a FLAW. Doesn't work well.


Actually you're a moron, if you read the thread you see that the issue about 0 has been talked about and that DD3 was changed to reflect the general consensus that was reached, that nextpow(0) should equal 0. If you really want 1 there just change the first entry in the LUT.

Quote:
Original post by Thomas_CR
Critticall's and BSR4 are the only two in the game. Sorry folks!


Criticall was never in the game if you ask most people...

Share this post


Link to post
Share on other sites
Advertisement
I don't ask most people. I ask those who understand what the next power of 2 is.

Sorry, mend your DD3 yourself. Maybe a hybrid will run this time properly. It could be the fastest way "again".


Share this post


Link to post
Share on other sites
@Thomas_CR Ok, listen to reason (although you haven't do so anywhere else):

If in ANYTHING you're the only one out of dozens of people who gets a different answer that usually means that you're wrong. I didn't want to get involved in this, but you're arrogance and the fact that you just don't listen to anyone has gotten me convinced to try and force you to listen to at least someone. If you can't understand that your algorithm isn't the fastest over the given test area in a real life situation (eg a game in RELEASE MODE obviously) then maybe you're not cut out to do this sort of thing. If you can't accept defeat, then go back to kindergarden and get taught some humility.

Besides, I know the real reason you haven't shown any benchmarks, it's because you did do them, but they showed that yours was slower. You don't want to be proven wrong, so you don't mention them and keep insisting that your method is faster.

If I were to use a method, I'd use DD3, because it's simple, and efficient. It doesn't use loads of if statements, and look up tables have always been used for optimization (try to load HQ background on a GBA without them).

So just give up now, before you further embarass yourself. You've already ruined all of your credibility, and now no one will ever want to hear what you have to say.

Good job, way to raise the bar.

EDIT: BTW, nextpow2(0) should equal 0. Anyone who's taken grade 11 math should know this. 2^0 = 1, 2^-1 = 1/2 ... 2^-inf = 0

It's just that simple!

Share this post


Link to post
Share on other sites
Quote:
Original post by Thomas_CR
I don't ask most people. I ask those who understand what the next power of 2 is.

Sorry, mend your DD3 yourself. Maybe a hybrid will run this time properly. It could be the fastest way "again".


In order to mend something it has to be broken, DD3 isn't broken it works exactly like specified that is it gives the same results as the "logical" version. Sure you could argue that the specification is wrong but the customer is always right you know. If they order something broken you better not tell them that it's wrong, and you really can't dismiss the competition by saying "my solution is mathematicly superior their compilers are crazy so don't mind that it takes twice as long covers a smaller range and doesn't scale" the LUT doesn't make an assumption about the distribution it's generall over the whole supported range.

Share this post


Link to post
Share on other sites

This topic is 5600 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!