kaityo256 / minlex

Show the minlex canonical order form of the given Sudoku grid.
MIT License
4 stars 2 forks source link

a little optimization of left_most_bit #1

Closed herumi closed 7 years ago

herumi commented 7 years ago

on i7-7500U 2.7GHz % time ./org sample.txt > b.txt 2.600u 0.024s 0:02.62 100.0% 0+0k 0+808io 0pf+0w % time ./a.out sample.txt > a.txt 2.416u 0.008s 0:02.45 98.3% 0+0k 0+808io 0pf+0w % diff a.txt b.txt %

kaityo256 commented 7 years ago

ありがとうございます。うちの環境でも1割程度速くなることを確認しました。 Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz ./before.out sample.txt > orig.txt 2.17s user 0.01s system 99% cpu 2.183 total ./after.out sample.txt > test.txt 1.95s user 0.01s system 96% cpu 2.030 total