Giter Club home page Giter Club logo

kmeans's People

Contributors

alexst07 avatar andreaferretti avatar andreatp avatar babo avatar def- avatar dwijnand avatar evacchi avatar fralken avatar franciscouzo avatar gcanti avatar jkillian avatar maltempi avatar masterduke17 avatar mfirry avatar pcostanza avatar pichi avatar rx14 avatar shepmaster avatar steveklabnik avatar tilient avatar tkelman avatar yawnt 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  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  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

kmeans's Issues

The java version is obviously cheating

The java version of this k-means benchmark code is obviously cheating compared to other object-oriented language versions, i.e the ruby one. Since I'm not a language expert, I did not check other language versions other than java and ruby.

  • The java version reused the Centroids array between iterations for every run loop, while the ruby version re-allocates.
  • The java version uses addToThis() method to avoid allocating new Point object, while the ruby version allocates new Point object on every + operator calling. This makes the ruby version allocating Point object about 100,000 ร— 15 more times than the ruby version for every run. The divideToThis() does the same thing, but is fare less important then the former.

Use Docker to encapsulate environments

Andrea, this is a neat project. I wonder if adding a Dockerfile to each directory would make this project fun for you again, and relieve you of having to manually manage a polyglot host environment. If all tests are run in a container, it would be a fairly level playing field, and the results would still work as a relative comparison.

libjansson error?

Hey, So I am using AWS cuda instance and trying to run cuda version. AWS Instance has everything installed and I have installed jansson from http://shellgui-docs.readthedocs.io/en/latest/gettingstarted.html successfully. Still I am getting this error. Any suggestion ? Thanks

./kmeans.out: error while loading shared libraries: libjansson.so.4: cannot open shared object file: No such file or directory

edit:

echo $LD_LIBRARY_PATH

/root/lib/

and /root/lib/ has following files:
libjansson.a libjansson.la libjansson.so libjansson.so.4 libjansson.so.4.9.0 pkgconfig

An alternate C code

Hi, somehow I hit across your benchmark and got interested. Your C code scores so low which got me interested (doesn't nim compile into C so how can the native C be slower than nim?).

Any way, I wrote my own quick version of bench code and would like you to time on your machine.

https://github.com/hzhou/kmean.

You can directly compile the c file

gcc test.c && ./a.out

I developed the code in my own meta-layer (MyDef), so if you want a more readable version, you may read test.def directly.

I didn't use any json library nor hash maps, so no dependency and the parsing overhead should be negligible for the benchmark anyway.

Regardless the result, nice work!

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.