Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

What is the fastest datatype

Name: Anonymous 2010-07-11 11:58

byte, int, double, float? Considering modern consumer PC.

Name: Anonymous 2010-07-11 12:03

struct.

Name: Anonymous 2010-07-11 12:08

a series of long long ints in SSE registers.

Name: Anonymous 2010-07-11 12:26

Theoretically a FPU native type should fastest(even faster than SSE due lower latency)

Name: Anonymous 2010-07-11 12:27

Depends on the CFLAGS

Name: Anonymous 2010-07-11 12:31

{u,}int_fast{8,16,32,64}_t

Name: Anonymous 2010-07-11 12:35

word. Smaller types involve extra & instructions to keep within type limits. Larger types need more cycles to load the relevant value.

Name: Anonymous 2010-07-11 12:44

>>6
Isn't compiler always picking the fastest type? int should be just as fast.

Name: Anonymous 2010-07-11 12:47

JavaScript IIRC used doubles for all math calculations and its way slower.

Name: Anonymous 2010-07-11 13:15

What does it mean for a datatype to be the ``fastest''?

Name: Anonymous 2010-07-11 13:32

>>10
Fastest at load, storing, i'm guessing?

Name: Anonymous 2010-07-11 13:38

>>9
I really can't think of a reason for using doubles. Surely no one who needs double-precision has thought, "I know, I'll write it for the web."

Name: Anonymous 2010-07-11 13:39

>>9,12
Some people, when confronted with writing a web application, think "I know, I'll use Javascript." Now they have double precision.

Name: Anonymous 2010-07-11 13:40

>>12
needs double-precision
Have you ever used regular floats? It's amazing how many applications need double precision.
IEEE 754 is pretty terrible.

Name: Anonymous 2010-07-11 13:44

>>14
Yeah. Nothing I've ever written that needs even as much as float precision would be suitable for the web.

Name: Anonymous 2010-07-11 14:03

>>15
That says a lot more about you than it does about the Web.

Name: Anonymous 2010-07-11 14:18

>>14
I just use rationals.

Name: Anonymous 2010-07-11 14:32

>>12
Actually many integer/math/science algorithms have been ported to JavaScript.

Name: Anonymous 2010-07-11 15:29

>>16
Hyped for ChromeOS are we?

Name: Anonymous 2010-07-11 16:17

>>10
Faggot quotes aside, the spec indicates that it's up to the implementation to determine what a "fast" type is. I don't know why they did this, it's pretty retarded.

On the other hand, I've done performance tests over very large numbers of loops for both signed and unsigned variables of all sizes. As it turns out, short and long long take a lot more time to assign values than int or char. Granted, I used Visual Studio 2008 and an x86 platform, but it makes sense because the datatypes I mentioned tend to be optimized.

Name: Anonymous 2010-07-11 16:22

>>20
Faggot quotes aside
Xarn uses these, so kindly fuck off.

Name: Anonymous 2010-07-11 17:30

>>21
Did you just come from the imageboards or something?

Name: Anonymous 2010-07-11 17:31

>>22
Did you?

Name: Anonymous 2010-07-11 17:34

>>21-22
Gentlemen, please. Stop trying to assert untruths.

Name: Anonymous 2010-07-11 17:34

>>24
/21-22/22-23/

Name: Anonymous 2010-07-11 17:37

>>25
What about my sed: -e expression #1, char 8: unknown command: `2'?

Name: Anonymous 2010-07-11 22:19

uint13_t obviously

Name: Anonymous 2010-07-11 23:52

doubles because they go 2x as fast

Name: Anonymous 2010-07-12 2:33

>>26
>>25's post is a folder structure, not a sed command.

Name: Anonymous 2010-07-12 17:06

std::list<char>

Name: Anonymous 2011-01-31 20:06

<-- check em dubz

Don't change these.
Name: Email:
Entire Thread Thread List