LINUX.ORG.RU

История изменений

Исправление fsb4000, (текущая версия) :

Попробовал запустить.

Исправил только это. (удалил аттрибут)

 g++-9 -Ofast -march=native -fwhole-program -std=gnu++2a -lstdc++fs main3.cpp -o 3
main3.cpp:139:22: error: '__attribute_noinline__' does not name a type
  139 | template<typename F> __attribute_noinline__ auto bench(std::string_view name, F && f, size_t setsize) {

4 это 3 с

constexpr size_t buff_size = line_size * 1024 * 128;

for PROG in 1 2 3 4 ; do echo "source $PROG"; for i in 1, 2, 3 ; do time ./$PROG 0 < fasta_100000000.txt > /dev/null; done; done
source 1

real    0m1.685s
user    0m1.125s
sys     0m0.510s

real    0m1.651s
user    0m1.126s
sys     0m0.506s

real    0m1.640s
user    0m1.120s
sys     0m0.499s
source 2

real    0m4.471s
user    0m1.476s
sys     0m2.694s

real    0m3.900s
user    0m1.423s
sys     0m2.103s

real    0m3.655s
user    0m1.415s
sys     0m1.980s
source 3
replace: 0.140054sec, 1.352114GB/s
replace: 0.209207sec, 1.357762GB/s
replace: 0.350408sec, 1.351060GB/s

real    0m2.404s
user    0m1.131s
sys     0m0.605s
replace: 0.139719sec, 1.355356GB/s
replace: 0.210292sec, 1.350757GB/s
replace: 0.348478sec, 1.358543GB/s

real    0m1.660s
user    0m1.126s
sys     0m0.521s
replace: 0.138671sec, 1.365599GB/s
replace: 0.209871sec, 1.353467GB/s
replace: 0.348412sec, 1.358800GB/s

real    0m1.665s
user    0m1.123s
sys     0m0.520s
source 4
replace: 0.181587sec, 1.042855GB/s
replace: 0.241529sec, 1.176063GB/s
replace: 0.402196sec, 1.177094GB/s

real    0m1.813s
user    0m1.247s
sys     0m0.510s
replace: 0.167530sec, 1.130358GB/s
replace: 0.244053sec, 1.163900GB/s
replace: 0.402884sec, 1.175083GB/s

real    0m1.782s
user    0m1.243s
sys     0m0.520s
replace: 0.169406sec, 1.117841GB/s
replace: 0.242303sec, 1.172307GB/s
replace: 0.398346sec, 1.188470GB/s

real    0m1.775s
user    0m1.243s
sys     0m0.515s

Про taskset

taskset: command not found

brew install taskset
Error: No available formula with the name "taskset"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
  git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
g++-9 -v
Using built-in specs.
COLLECT_GCC=g++-9
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/9.2.0_1/libexec/gcc/x86_64-apple-darwin15/9.2.0/lto-wrapper
Target: x86_64-apple-darwin15
Configured with: ../configure --build=x86_64-apple-darwin15 --prefix=/usr/local/Cellar/gcc/9.2.0_1 --libdir=/usr/local/Cellar/gcc/9.2.0_1/lib/gcc/9 --disable-nls --enable-checking=release --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-9 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --with-pkgversion='Homebrew GCC 9.2.0_1' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues
Thread model: posix
gcc version 9.2.0 (Homebrew GCC 9.2.0_1)

Исходная версия fsb4000, :

Попробовал запустить.

Исправил только это.

 g++-9 -Ofast -march=native -fwhole-program -std=gnu++2a -lstdc++fs main3.cpp -o 3
main3.cpp:139:22: error: '__attribute_noinline__' does not name a type
  139 | template<typename F> __attribute_noinline__ auto bench(std::string_view name, F && f, size_t setsize) {

4 это 3 с

constexpr size_t buff_size = line_size * 1024 * 128;

for PROG in 1 2 3 4 ; do echo "source $PROG"; for i in 1, 2, 3 ; do time ./$PROG 0 < fasta_100000000.txt > /dev/null; done; done
source 1

real    0m1.685s
user    0m1.125s
sys     0m0.510s

real    0m1.651s
user    0m1.126s
sys     0m0.506s

real    0m1.640s
user    0m1.120s
sys     0m0.499s
source 2

real    0m4.471s
user    0m1.476s
sys     0m2.694s

real    0m3.900s
user    0m1.423s
sys     0m2.103s

real    0m3.655s
user    0m1.415s
sys     0m1.980s
source 3
replace: 0.140054sec, 1.352114GB/s
replace: 0.209207sec, 1.357762GB/s
replace: 0.350408sec, 1.351060GB/s

real    0m2.404s
user    0m1.131s
sys     0m0.605s
replace: 0.139719sec, 1.355356GB/s
replace: 0.210292sec, 1.350757GB/s
replace: 0.348478sec, 1.358543GB/s

real    0m1.660s
user    0m1.126s
sys     0m0.521s
replace: 0.138671sec, 1.365599GB/s
replace: 0.209871sec, 1.353467GB/s
replace: 0.348412sec, 1.358800GB/s

real    0m1.665s
user    0m1.123s
sys     0m0.520s
source 4
replace: 0.181587sec, 1.042855GB/s
replace: 0.241529sec, 1.176063GB/s
replace: 0.402196sec, 1.177094GB/s

real    0m1.813s
user    0m1.247s
sys     0m0.510s
replace: 0.167530sec, 1.130358GB/s
replace: 0.244053sec, 1.163900GB/s
replace: 0.402884sec, 1.175083GB/s

real    0m1.782s
user    0m1.243s
sys     0m0.520s
replace: 0.169406sec, 1.117841GB/s
replace: 0.242303sec, 1.172307GB/s
replace: 0.398346sec, 1.188470GB/s

real    0m1.775s
user    0m1.243s
sys     0m0.515s

Про taskset

taskset: command not found

brew install taskset
Error: No available formula with the name "taskset"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
  git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
g++-9 -v
Using built-in specs.
COLLECT_GCC=g++-9
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/9.2.0_1/libexec/gcc/x86_64-apple-darwin15/9.2.0/lto-wrapper
Target: x86_64-apple-darwin15
Configured with: ../configure --build=x86_64-apple-darwin15 --prefix=/usr/local/Cellar/gcc/9.2.0_1 --libdir=/usr/local/Cellar/gcc/9.2.0_1/lib/gcc/9 --disable-nls --enable-checking=release --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-9 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --with-pkgversion='Homebrew GCC 9.2.0_1' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues
Thread model: posix
gcc version 9.2.0 (Homebrew GCC 9.2.0_1)