Install
Prepare for compilation:
By default, htop will be installed under
build and install
Voila! You're done. just run it using:
#linux #centos #htop #compile #source #install
htop
on CentOS
from source:htop
is a real-time process viewer for Linux. First, install prerequisites and download the source:yum groupinstall "Development Tools"
yum install ncurses-devel
wget http://hisham.hm/htop/releases/2.0.2/htop-2.0.2.tar.gz
tar xvfvz htop-2.0.2.tar.gz
cd htop-2.0.2/
Prepare for compilation:
./configure
By default, htop will be installed under
/usr/local/bin
. If you want to change installation location to something else (e.g., /usr/ bin`), run configure script with `--prefix
option instead. For example:./configure --prefix=/usr
build and install
htop
as follows:make
make install
Voila! You're done. just run it using:
htop
#linux #centos #htop #compile #source #install
tuples
vs list
from a different point of view. Tuples of constants can be precomputed by Python's peephole optimizer or AST-optimizer. Lists, on the other hand, get built-up from scratch:>>> from dis import dis
>>> dis(compile("(10, 'abc')", '', 'eval'))
1 0 LOAD_CONST 2 ((10, 'abc'))
3 RETURN_VALUE
>>> dis(compile("[10, 'abc']", '', 'eval'))
1 0 LOAD_CONST 0 (10)
3 LOAD_CONST 1 ('abc')
6 BUILD_LIST 2
9 RETURN_VALUE
#python #list #tuple #performance #dis #compile #ast_optimizer