riandy-dimas / yes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YES Command

Unix has yes command that print a line of spesified string or a y repeatedly until killed. This command is written by David MacKenzie.

example: yes will output:

y
y
y
y
y
y
.... (still continue)

yes man will output:

man
man
man
man
man

Result

Running on i7-6820HQ 2.70GHz, 16GB RAM, 256SSD.

How to measure? use pv -r to get rate of data transfer yes | pv -r > /dev/null

  • Build-in yes command (version 8.28) gives me 5.69 GB/s.
  • Simple python code only gives me 10.8 MB/s. 7.70 MB/s
  • C code gives me 111 MB/s
  • Rust code gives me 2.7 MB/s
  • Java code gives me 3.70 MB/s

About

License:MIT License


Languages

Language:Java 29.1%Language:Go 20.7%Language:C 16.5%Language:JavaScript 14.0%Language:Python 11.0%Language:Rust 8.8%