Shorts

Kevin Martin
Kevin Martin

Why do you use Int for numbers in your programs? Shouldn't you be using short? Are you really calculating and working with numbers higher than 32787 (or 65535 unsigned)? Unless you are, you should use shorts. Why aren't you using shorts? Shorts are great. Shorts are love. Shorts are life!

S H O R T S
H
O
R
T
S

Other urls found in this thread:

youtube.com/watch?v=LJoRyxRcj4A

Andrew Harris
Andrew Harris

It takes more cycles to perform the bitshift from the CPU's native datatype. Kill yourself, or come back when you graduate CS101, kiddo.

Zachary Cooper
Zachary Cooper

usize by default then?

Carter Jenkins
Carter Jenkins

But that's just the minimum required size for ints.

Juan Wright
Juan Wright

Because chicks dig longs.

Wyatt Gray
Wyatt Gray

chad uses longs for everything.

Logan Turner
Logan Turner

Why did you make the same thread in halfchan?

Brandon Lee
Brandon Lee

It doesn't, though. We're not using Alpha shit anymore, grandpa.

Gavin Price
Gavin Price

Remember to not try to store your long long in short shorts.

Wyatt Peterson
Wyatt Peterson

Maybe he's using a real computer like pic-related.

Kayden Hill
Kayden Hill

That statement offends my CoC.

Matthew Ramirez
Matthew Ramirez

nice long doubles

Michael Cruz
Michael Cruz

all joking aside, 32-bit float and integer operations easily outperform 64-bit operations -- by a factor of 2. CPU literally does half the work.
If you're doing a bunch of work with a bunch of numbers, consider early how much precision you need.
dunno if this applies to shorts though. maybe if OP's picture were more to my tastes.

Ryan Gomez
Ryan Gomez

Daily reminder FORTH users don't have these problems.

youtube.com/watch?v=LJoRyxRcj4A

Alexander Sanders
Alexander Sanders

everyone ITT is LARPing because the proper way to use integers for speed in C is to use a "fast" integer instead of fixed size. and if you're using any other PL, you really shouldn't be pretending to care about speed of arithmetic. if you're using an assembler, you aren't using retard words like "long", "short", etc

Robert Bailey
Robert Bailey

I'm sorry did you just ASSUME the bit-width of short and int on my machine?!?! I really hope nobody here actually uses integral data types other than char, size_t/ssize_t, and stdint types. Jeez

Elijah Sanchez
Elijah Sanchez

C…
and if you're using any other PL, you really shouldn't be pretending to care about speed of arithmetic
any other PL
like C++ or Rust, for example?

Christopher Edwards
Christopher Edwards

uintptr_t

Ethan Collins
Ethan Collins

You do realize that anything shorter than an int is promoted to int anyway whenever actually used? You do realize that '\0' or 'a' are of type int in C? shorts are only really useful if you're literaly short on memory where you store them (such as embedded etc.).

Lincoln Harris
Lincoln Harris

he doesn't do real-mode DOS programming where int equals short
Nice try, off-by-one-Satan.

Caleb Collins
Caleb Collins

Speed is not the only possible problem, there's also memory. Sometimes you don't care much about speed but need to fit small memory. Also

Christian Brooks
Christian Brooks

Computing almost always involves a trade-off between being processing and memory. For instance in the 90s, when CPUs were too weak to render cutscenes in realtime or decode compressed audio formats in a game but the new CD-ROM medium offered much space, you had most of the CD's space filled with pre-rendered cutscenes and/or CD audio music. You traded memory to save on processing. Later when CPUs were more powerful, they rendered cutscenes and decoded compressed audio in realtime, and the space on the CDs was devoted to other games assets so the games themselves could be bigger. You traded processing to regain memory (in the form of space on the CD) for other purposes. That's just one example, but decisions about tradeoffs like these need to be made quite often (not as much as it used to be the case, but in situations like embedded sofware where both processing power and available memory is short, it's still very important).

Juan Roberts
Juan Roberts

tfw mostly using u8
why the fuck would i waste my memory?

Easton Jones
Easton Jones

u8
At least use the standard uint8_t

Hunter Ramirez
Hunter Ramirez

long doubles
not double doubles
Ya blew it.

Elijah Phillips
Elijah Phillips

long long cock = deep_in_ops_ass();

Aiden Long
Aiden Long

low memory is for double niggers.

Nicholas Wright
Nicholas Wright

Ya done goofed. Double uses the most memory.

Bentley Murphy
Bentley Murphy

user's program conserves memory like a cuck
now chadfox has more memory to leak

Ayden Allen
Ayden Allen

Any float is implicitly promoted to double anyway, and floats only have a 24 bit mantissa (about 7 decimal significant figures) which leads to rounding errors accumulating pretty fast. It's for good reasons that int and double are default types and anything shorter needs to be used explicitly by someone who knows what and why he's doing.