Search Results - CodeGuru Forums
 CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

# Search:

Type: Posts; User: S@rK0Y

Page 1 of 2 1

## Search: Search took 0.01 seconds.

by S@rK0Y
Replies
27
Views
814

### Re: Difficult Algorithm!

oops, sorry for typo, 'c(m)' has to be 'c(w)' :)

by S@rK0Y
Replies
27
Views
814

### Re: Difficult Algorithm!

each group is sorted list of distances from 0-checkpoint per se. So, you can try new edges for given group in binary search. for example:

1. we have three groups (A, B, C).
2. A has n items, B --...

by S@rK0Y
Replies
27
Views
814

### Re: Difficult Algorithm!

run binary search to balance neighbors. if groups have a lot of items, it will be useful to speed up.

by S@rK0Y
Replies
27
Views
814

### Re: Difficult Algorithm!

well, let's run example. for instance, we have:

#1 group: {15, 27, 31}
#2: { 34, 47, 51}
#3: {57, 65, 90}

****
max distance for #1: 31 - 15 = 16
#2: 17
#3: 33

by S@rK0Y
Replies
27
Views
814

### Re: Difficult Algorithm!

you must deal w/ Just edges of the group, i. e. farthest villages. actually, correction may run the following way:

1. take group w/ longest distance between edges.
2. move edges to neighboring...

by S@rK0Y
Replies
27
Views
814

### Re: Difficult Algorithm!

well, let's dip deeper:

1. take list of villages sorted by distances from zero-checkpoint.
2. divide that list in M groups.
3. for each group, take the two villages w/ maximal distance between...

by S@rK0Y
Replies
27
Views
814

### Re: Difficult Algorithm!

divide N villages into M groups & place each hospital for each group.

PS

each group consists of most closest villages to one another. ;)

by S@rK0Y
Replies
52
Views
4,383

### Re: IF-free conception.

OReubens, would ye like to post full listing of output? this part seems to me as standard 3OE approach. And it doesn't contradict w/ my words about:

ucomisd (%rax), %xmm1

by S@rK0Y
Replies
52
Views
4,383

### Re: IF-free conception.

2kaud, actually, i put 'pivot' & some of other vars in xmmXX & mmX -- quite useful to reduce data flow. In fact, loops must be so light as possible. by the way, these lines:

...

by S@rK0Y
Replies
52
Views
4,383

### Re: IF-free conception.

OReubens, performance of any algo is:

1. data-dependent.
2. hardware-dependent.
---------------------------------------
in true HPC, we can't rely Just upon some kind of math abstraction.

...

by S@rK0Y
Replies
52
Views
4,383

### Re: IF-free conception.

Superbonzo, at most, Optimization doesn't need a genius programmer, it needs long standard routines to analyze existed bottlenecks & possible bypasses. and i gonna repeat for yet another time: modern...

by S@rK0Y
Replies
52
Views
4,383

### Re: IF-free conception.

Superbonzo, well, i'd like to share my view: i think practice always has the last word. Everyone can say everything, but only Goddess Practice can determine who is right or wrong ;) in the practice,...

by S@rK0Y
Replies
52
Views
4,383

### Re: IF-free conception.

Superbonzo, optimized code ain't gambling at all. it's Just clear understanding of your very goal & the methods to achieve it. theoretically, we can use...

by S@rK0Y
Replies
52
Views
4,383

### Re: IF-free conception.

Razzle, through prism of HPC, you need to lessen the number of threads as far as ye can do it: in the best scenario, MT algos boost performance linearly. For instance, performance of 4 000 000 of...

by S@rK0Y
Replies
52
Views
4,383

### Re: IF-free conception.

Razzle, in fact, true HPC was destroyed by GHz in CPUs. who cares about optimization, if new "stone" will give more GHz muscle??? some years ago, many "experts" dreamed of 10 Ghz "stone". But such...

by S@rK0Y
Replies
52
Views
4,383

### Re: IF-free conception.

2 OReubens

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...

by S@rK0Y
Replies
52
Views
4,383

### Re: IF-free conception.

2 Razzle

actually, from the very start, i've suggested nothing. i just have shared the code to test it onto different intel-based machines.

this solution is the cpu-hosted code, it's...

by S@rK0Y
Replies
52
Views
4,383

### Re: IF-free conception.

D Drmmr, i did run optimized code. however, there could be problems w/ smarty modes of compilers because algo has used rXX, xmmXX & mmX registers as global vars. nevertheless nothing prevents us to...

by S@rK0Y
Replies
52
Views
4,383

### Re: IF-free conception.

Razzle, IT has no magic pills. even if to say about sorting algos, the're a lot of 'minors':

1. data structures (array has low performance at the rest of possible operations).
2. number of items...

by S@rK0Y
Replies
52
Views
4,383

### Re: IF-free conception.

Razzle, we can dispute up to Infinity & Beyond :) i'd like to see real benchmarks, you could run fsort(no-if) onto your intel-based machine(s) & only this can be the last word for such discussions.
...

by S@rK0Y
Replies
52
Views
4,383

### Re: IF-free conception.

Razzle, yes, multi-threading can be exploited w/o low-level programming. however, MT has a lot of troubles for developers: you have to sync concurrently-running objects & this moment (in many cases)...

by S@rK0Y
Replies
52
Views
4,383

### Re: IF-free conception.

well, Razzle, let's try to cross our t's at least for a little of possible ones. state-of-the-art hardware has 6-way approach to speed-up algos:

2. 3OE (out-of-order...

by S@rK0Y
Replies
52
Views
4,383

### Re: IF-free conception.

Razzle, 1st of the all, Thanks for your reply. Frankly, Epoch of readable codes was passed by: we have a lot of ways to speed-up our codes thanks to modern hardware, but high-level programming has no...

by S@rK0Y
Replies
52
Views
4,383

### Re: IF-free conception.

i'm back, my Friends :D here (http://alg0z.blogspot.ru/2014/07/fastsortfsort-no-if-vs-qsort.html) is very nutty-freaky, but fast code. i'd like to see benchmarks on your hardware. ;) Thanks a lot in...

by S@rK0Y
Replies
52
Views
4,383

### Re: IF-free conception.

Hi, Dave. here we got really comic situation: at C-level, it's if-free code, but compilers provide horrible amount of conditional jumps in the Asm output. :eek: in short, i see only solution: to...
Results 1 to 25 of 29
Page 1 of 2 1