Try   HackMD

2016q3 Homework 1 (clz)

tags: sysprog21 JongSyuGithub

contributed by <JonSyuGithub>
github: https://gtihub.com/JonSyuGithub/clz

Environment

  • OS: Ubuntu 16.04 LTS

  • CPU: i5-457

  • Memory 12GB ($ cat /proc/meminfo)

  • Update & Install

$ sudo apt-get update
$ sudo apt-get install build-essential
$ sudo apt-get install linux-tools-common linux-tools-generic
$ sudo apt-get install astyle colordiff gnuplot

Objective

  • Understanding the description about count leading zero (clz) from "https://hackmd.io/s/SkKZBXZT" and comparsion of performance between the following version:
    • recursive version
    • iteration version
    • binary search technique
    • byte-shift version
    • Harley’s algorithm

Git

# setting parameter
$ git config --global user.email "your e-mail"
$ git config --global user.name "your name"
$ git config --global push.default matching
$ git remote set-url origin https://github.com/JonSyuGithub/clz-tests.git
			
# update 
$ git add .
$ git commit -m "initial import"
$ git push

Running

  • Compile & Run
$ make
$ make plt
  • 每個方法執行4000000的時間差

References