GithubHelp home page GithubHelp logo

bsort's People

Contributors

adamdeprince avatar arturasi avatar nelsonscott avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bsort's Issues

Tarball broken

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

Flag to ignore n bytes at the beginning

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.

Can't reproduce performance

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,

Progress reporting

I am using bsort on large files (duh), and it would be quite handy to have some form of progress reporting or ETA estimation.

parallelization using OpenMP

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.