|
-
July 30th, 2014, 02:23 PM
#16
Re: IF-free conception.
2 OReubens
precisely BECAUSE a compiler can do microoptimizing a lot better than most programmers out there.
And giving a compiler "the raw code" will allow the compiler more leeway in optimizing than already trying to 'preset' the compiler into a specific type of thinking.
and also BECAUSE doing this by hand and get better performance takes a lot of time by a (#1)very experienced ASM programmer and it will typically only yield percentages. Most of the time that's (#2)not going to be significant enough to warrant the time/expense.
Ye're Absolutely Right about #1 & i Absolutely don't share your #2: at large scale, highly-optimized code takes times lower ticks (at least) to accomplish the same task. Big Data bulges all bottlenecks in given solutions.
yes, but this is why it makes little sense to compare. Or rather, it makes a case for the sort algorithm itself 'qsort' vs 'fsort'. Rather than a "if based" vs "no if" concept.
well, for instance, purely if-based solution gonna take 8 "ifs" (even 11 in the worst realization) per loop, but if-reduction strategy makes possible to deal w/ only 3 "ifs" as well. not so bad, ain't it? 
If you want fast sorting of floats, then a radix type sort (splitting it over exponent then mantissa) based solution is going to beat the pants off both qsort and fsort. (at a cost of more memory).
yes, it's well-known fact that memory-gobbling approach could easily skyrocket the performance, but (for BD), you quickly shall run out of memory & speed-up shall be ruined completely.
never claimed there is no space for hand crafted assembly code. There very much is. But there aren't a lot of people out there with the skills to make it really shine. Personally, if I can't at least imagine I'm going to get a 10x (that's 10 times, not 10%) improvement, I typically won't bother because it's a painful, slow process, and makes maintaining the code an even bigger pain. ANd quite often you'll need to make more than one version of the code to cater to changes in processor families.
Perfect True but the're no way around: HPC is hella cruel Hell to burn brains of developers awfully down to the ashes
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|