flat assembler
Message board for the users of flat assembler.

Index > Main > Good sort?

Author
Thread Post new topic Reply to topic
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak
No more giving back...


Last edited by kohlrak on 07 Aug 2008, 14:33; edited 1 time in total
Post 12 Jun 2008, 01:53
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
r22



Joined: 27 Dec 2004
Posts: 805
r22
For unsigned INTs radix sort is the best.

http://board.flatassembler.net/topic.php?t=5081&postdays=0&postorder=asc&start=20

The linked thread has the code I put together, I think it's still the fastest implementation available.
Post 12 Jun 2008, 02:54
View user's profile Send private message AIM Address Yahoo Messenger Reply with quote
Raedwulf



Joined: 13 Jul 2005
Posts: 375
Location: United Kingdom
Raedwulf
For unsigned ints - and in-place sorting, heap sort with some tweaks can make it very fast. Faster than Quicksort up to a certain limit.

_________________
Raedwulf
Post 12 Jun 2008, 05:24
View user's profile Send private message MSN Messenger Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak
No more giving back...


Last edited by kohlrak on 07 Aug 2008, 14:33; edited 1 time in total
Post 12 Jun 2008, 17:07
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
Random number generator?

Just read /dev/random or /dev/urandom , depending on how random you want it Razz
Post 12 Jun 2008, 23:19
View user's profile Send private message Visit poster's website Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak
No more giving back...


Last edited by kohlrak on 07 Aug 2008, 14:33; edited 1 time in total
Post 13 Jun 2008, 05:01
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
mmap() by itself is not enough to load a shared library - but mmap() is used in the process, just like it's used on windows to load PE executables (and DLLs).

As far as I've been able to tell, the linux kernel itself doesn't have all the code to load shared libraries - as of recent (last N years) part of the stuff is implemented in (g)libc and ld.so... and you really probably are best off sticking with dlopen()/dlsym()/dlclose().

Linux is pretty different from Windows Smile
Post 13 Jun 2008, 12:33
View user's profile Send private message Visit poster's website Reply with quote
wildtollwut



Joined: 10 Jul 2003
Posts: 4
Location: Germany
wildtollwut
Super scalar sample sort should be pretty fast Smile at least way faster than heap sort with guaranteed O(n log n)

see for example
http://rw4.cs.uni-sb.de/~sewi/ssss.pdf
Post 13 Jun 2008, 13:01
View user's profile Send private message Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak
No more giving back...


Last edited by kohlrak on 07 Aug 2008, 14:32; edited 1 time in total
Post 14 Jun 2008, 06:59
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
gunblade



Joined: 19 Feb 2004
Posts: 209
gunblade
If you are trying to load a shared library in linux, then im afraid its linker, or ugly hack (although the ugly hack will probably simply be emulating the actions of a linker in one way or another).

If you want to keep the binaries pure, dont use external shared libraries (usually written in C anyway), and simply use Format ELF Executable.
Post 15 Jun 2008, 12:40
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.