Giter Site home page Giter Site logo

int2binary's Introduction

int2binary

cat input_control_data.txt
12
16
31
8
9

./num2binaries -f input_control_data.txt | head
8 4
16
16 8 4 2 1
8
8 1

python3 -B num2binaries.py -f input_control_data.txt | head
[4, 8]
[16]
[1, 2, 4, 8, 16]
[8]
[1, 8]

php num2binaries.php -f input_control_data.txt | head
4 8
16
1 2 4 8 16
8
1 8

head input.txt
986296472
968937991
993314250
901938175
907449119
907406169
923078616
955147695
958385122
940840904

./num2binaries -f input.txt | head
536870912 268435456 134217728 33554432 8388608 4194304 524288 65536 32768 8192 4096 128 16 8
536870912 268435456 134217728 16777216 8388608 4194304 32768 16384 4096 512 4 2 1
536870912 268435456 134217728 33554432 16777216 2097152 1048576 262144 32768 16384 1024 256 128 64 8 2
536870912 268435456 67108864 16777216 8388608 4194304 131072 16384 8192 4096 2048 512 256 128 64 32 16 8 4 2 1
536870912 268435456 67108864 33554432 1048576 262144 131072 32768 4096 512 256 16 8 4 2 1
536870912 268435456 67108864 33554432 1048576 262144 65536 32768 16384 8192 2048 512 256 64 16 8 1
536870912 268435456 67108864 33554432 16777216 262144 65536 2048 1024 512 256 128 64 16 8
536870912 268435456 134217728 8388608 4194304 2097152 524288 262144 131072 16384 8192 1024 256 128 32 8 4 2 1
536870912 268435456 134217728 16777216 1048576 524288 262144 131072 65536 32768 16384 2048 512 256 128 64 32 2
536870912 268435456 134217728 1048576 262144 4096 1024 512 256 128 64 8

time ./num2binaries -f input.txt | wc -l
1000000

real	0m1.662s
user	0m1.652s
sys	0m0.085s

time php num2binaries.php -f input.txt | wc -l
1000000

real	0m3.831s
user	0m3.102s
sys	0m3.260s

time python3 num2binaries.py -f input.txt | wc -l
1000000

real	0m7.602s
user	0m7.719s
sys	0m0.384s

int2binary's People

Contributors

ffamax avatar

Watchers

 avatar

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.