pelotoncycle / bsort Goto Github PK
View Code? Open in Web Editor NEWExtremely fast inplace radix sort
License: Other
Extremely fast inplace radix sort
License: Other
Your source tarball is broken.
$ tar -xvzf bsort-0.0.1.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
I’d like to sort records by a fields that is not at the beginning of the record, i.e. the dual of having -r ≠ -k
. Maybe -b
for begin?
It should be simple, I assume: Just pass begin with n
rather than 0
in the third argument to radixify
.
Retracting this. Changing the MAP_SHARED to MAP_PRIVATE only makes the file readable, but bsort no longer updates the data.
I'm trying to reproduce the gensort performance you mention in the Readme. By they way, it would be great to have this running multi-threaded to take advantage of multiple cores.
If I use j1e8.c I get a "Bus error" when trying to sort.
If I use bsort.c or qsort.c I run for >24 hours without finishing.
Worth to mention that when compiling bsort.c I get these warnings:
bsort.c: In function ‘shellsort’:
bsort.c:36:7: warning: passing argument 1 of ‘memcpy’ discards ‘const’ qualifier from pointer target type [enabled by default]
memcpy(a+j_record_size, a+(j-3)_record_size, record_size);
^
In file included from bsort.c:4:0:
/usr/include/string.h:42:14: note: expected ‘void * restrict’ but argument is of type ‘const unsigned char _’
extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
^
bsort.c:38:5: warning: passing argument 1 of ‘memcpy’ discards ‘const’ qualifier from pointer target type [enabled by default]
memcpy(a+j_record_size, &temp, record_size);
^
In file included from bsort.c:4:0:
/usr/include/string.h:42:14: note: expected ‘void * restrict’ but argument is of type ‘const unsigned char _’
extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
^
bsort.c:44:7: warning: passing argument 1 of ‘memcpy’ discards ‘const’ qualifier from pointer target type [enabled by default]
memcpy(a+j_record_size, a+(j-1)_record_size, record_size);
^
In file included from bsort.c:4:0:
/usr/include/string.h:42:14: note: expected ‘void * restrict’ but argument is of type ‘const unsigned char *’
extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
^
bsort.c:46:5: warning: passing argument 1 of ‘memcpy’ discards ‘const’ qualifier from pointer target type [enabled by default]
memcpy(a+j_record_size, &temp, record_size);
^
In file included from bsort.c:4:0:
/usr/include/string.h:42:14: note: expected ‘void * restrict’ but argument is of type ‘const unsigned char *’
extern void *memcpy (void **restrict __dest, const void __restrict __src,
^
bsort.c: In function ‘radixify’:
bsort.c:128:11: warning: passing argument 1 of ‘memcpy’ discards ‘const’ qualifier from pointer target type [enabled by default]
memcpy(&buffer[stack[stack_pointer] * record_size], &buffer[stack[stack_pointer-1] * record_size], record_size);
^
In file included from bsort.c:4:0:
/usr/include/string.h:42:14: note: expected ‘void * __restrict’ but argument is of type ‘const unsigned char *’
extern void *memcpy (void **restrict __dest, const void __restrict __src,
^
bsort.c:131:9: warning: passing argument 1 of ‘memcpy’ discards ‘const’ qualifier from pointer target type [enabled by default]
memcpy(&buffer[stack[0] * record_size], &temp, record_size);
^
In file included from bsort.c:4:0:
/usr/include/string.h:42:14: note: expected ‘void * __restrict’ but argument is of type ‘const unsigned char *’
extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
I am using bsort
on large files (duh), and it would be quite handy to have some form of progress reporting or ETA estimation.
The documentation says that -c
can be used, but the command line parser does not handle it (missing break
).
Would it be straightforward to make the sort parallel, such as using OpenMP? I'm mostly asking if there is a gotcha that I'm missing which would prevent it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.