Features/PowerManagement/scomes/examples

To have equivalent test enviroment - you can use:

echo 3 > /proc/sys/vm/drop_caches

will drop all disk caches

cgroups can set the size of memory

C OPTIMIZATIONS
gzip

compiled with different compilation flags:

lines with "-" in cells have the same value for all rows

tar:

shows too big changes so not good for any statistic :( (no complicated algorithm there)

octave:

startup of octave package:

t = 0:0.1:6.3; plot (t, cos(t), "-;cos(t);", t, sin(t), "+3;sin(t);"):

coreutils: du command on large dir - almost no differences

RESTRICTION TO THE MEMORY SIZE
I use to run one process on comp with enough memory and with limited ammount of memory: (the limit was set only for this process - cgroups)

READ BY getc, gets with different buffer size
Playing with cat command:

version 1:

while ( (c=getc(f)) != EOF) { putchar(c); }

version2:

while ( (c=getc(f)) != EOF) { if (poc < 99) { str[poc]=(char )c; poc++; } else { printf("%s",str); poc = 0; }       putchar(c); }

version3:

#define MAX 100 while ( (fgets(str,MAX, f)) != NULL) { puts(str); }

version4:

#define MAX 1000 while ( (fgets(str,MAX, f)) != NULL) { puts(str); }