DiscussionDivision Vs Multiplication

Posts 115 of 17 · Page 1 of 2
Division Vs Multiplication
So I've heard lots of stuff going around that basically if you have an option between division and multiplication you should always choose multiplication as it's faster in computers or something.

I've been wondering about the validity of this information and I had many things to think about, like when doing a healthbar do i divide the colors by 255, or do i multiply them by 0.00392156862.

Also what should i do if it's something like divided by 3? because multiplying by 0.333333333333333 would be infinitely recurring.

Hope you can help
Quote Originally Posted by snipwnage3 View Post
So I've heard lots of stuff going around that basically if you have an option between division and multiplication you should always choose multiplication as it's faster in computers or something.

I've been wondering about the validity of this information and I had many things to think about, like when doing a healthbar do i divide the colors by 255, or do i multiply them by 0.00392156862.

Also what should i do if it's something like divided by 3? because multiplying by 0.333333333333333 would be infinitely recurring.

Hope you can help
I heard Multiplication was faster, but i've never actually benchmarked it.
To benchmark code, save current time, do your code, substract saved time with current time, done
Benchmark division and multiplication and check which one is faster.
Code:
local hi = SysTime();
local yo = 1;
for i = 1, 10000 do
	yo = yo * 0.5;
end
print(SysTime() - hi)

local hi = SysTime();
local yo = 1;
for i = 1, 10000 do
	yo = yo / 2;
end
print(SysTime() - hi)



HAHAHA WTF LOL

Code:
local yo = 1;
local hi = SysTime();
yo = yo * 2;
print(SysTime() - hi)

local yo = 1;
local bye = SysTime();
yo = yo / 0.5;
print(SysTime() - bye)


HAHA DIVIDING / 0.5 is faster than Multiplying by 2

IM DONE DUDE
skids trying to paste and then ask questions about the paste

- - - Updated - - -

fucking retard cant even make a HEALTHBAR LOL
Quote Originally Posted by MasterKitty View Post
skids trying to paste and then ask questions about the paste

- - - Updated - - -

fucking retard cant even make a HEALTHBAR LOL
This thread doesn't apply to you cause all you do is paste your code; You probably don't even analyse it.
Quote Originally Posted by MasterKitty View Post
skids trying to paste and then ask questions about the paste

- - - Updated - - -

fucking retard cant even make a HEALTHBAR LOL
yet everyone that you talk to, you call them a skid!

because you think your win200/xeniumhook is superior or some shit
Quote Originally Posted by MasterKitty View Post
skids trying to paste and then ask questions about the paste

- - - Updated - - -

fucking retard cant even make a HEALTHBAR LOL
Horizontal healthbars haha fuck you.
Quote Originally Posted by snipwnage3 View Post
Horizontal healthbars haha fuck you.
Very nice.
Quote Originally Posted by snipwnage3 View Post
This thread doesn't apply to you cause all you do is paste your code; You probably don't even analyse it.
then explain why my hack is far better than yours

- - - Updated - - -

Quote Originally Posted by snipwnage3 View Post
Horizontal healthbars haha fuck you.
oman look at you using pasted ESP box and a shitty design, run away retard my esp will always be far more superior than yours

EDIT: you can't beat my hack
Quote Originally Posted by snipwnage3 View Post
Horizontal healthbars haha fuck you.
This esp isn't even good lol
Quote Originally Posted by dustyexplosion View Post
then explain why my hack is far better than yours

- - - Updated - - -



oman look at you using pasted ESP box and a shitty design, run away retard my esp will always be far more superior than yours

EDIT: you can't beat my hack
Alright paster

- - - Updated - - -

Quote Originally Posted by LordNub View Post
This esp isn't even good lol
How's your nyukiria rename dude?

700 Euros you payed wasn't it?
Quote Originally Posted by snipwnage3 View Post
Alright paster?
this is a worse joke than asking why your dell pc cant run gta v you fucking moron
Quote Originally Posted by LordNub View Post
This esp isn't even good lol
Looks better than mine tbh
Quote Originally Posted by asuchan View Post
Looks better than mine tbh
yeah because he pasted C++ code and then spent many hours converting it
Quote Originally Posted by dustyexplosion View Post
yeah because he pasted C++ code and then spent many hours converting it
Actually I'm completely clueless at C++; but ok.
Posts 115 of 17 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?