Skip to content

Comparison x86_64 ARM64 comparison on M1 macOS

Yasuhiro Yamada edited this page Mar 7, 2023 · 1 revision

Prerequisite

$ sysctl kern.version
kern.version: Darwin Kernel Version 21.6.0: Mon Dec 19 20:46:01 PST 2022; root:xnu-8020.240.18~2/RELEASE_ARM64_T8101

x86_64 executable on M1 macOS

$ file /opt/homebrew/bin/teip
/opt/homebrew/bin/teip: Mach-O 64-bit executable x86_64
$ teip --version
teip 2.1.0

$ time teip -og '([0-9]{1,3}\.){3}[0-9]{1,3}' -- awk '{gsub("([0-9]{1,3}\\.){3}[0-9]{1,3}","@@@.@@@.@@@.@@@",$0);print}' < test_secure > /dev/null

real    0m1.845s
user    0m2.264s
sys     0m0.310s
$ sync && sudo purge
$ time teip -og '([0-9]{1,3}\.){3}[0-9]{1,3}' -- awk '{gsub("([0-9]{1,3}\\.){3}[0-9]{1,3}","@@@.@@@.@@@.@@@",$0);print}' < test_secure > /dev/null

real    0m1.819s
user    0m2.270s
sys     0m0.301s
$ sync && sudo purge
$ time teip -og '([0-9]{1,3}\.){3}[0-9]{1,3}' -- awk '{gsub("([0-9]{1,3}\\.){3}[0-9]{1,3}","@@@.@@@.@@@.@@@",$0);print}' < test_secure > /dev/null

real    0m1.848s
user    0m2.284s
sys     0m0.308s

ARM64 executable on M1 macOS

$ file /opt/homebrew/bin/teip
/opt/homebrew/bin/teip: Mach-O 64-bit executable arm64
$ teip --version
teip 2.2.0
$ time teip -og '([0-9]{1,3}\.){3}[0-9]{1,3}' -- awk '{gsub("([0-9]{1,3}\\.){3}[0-9]{1,3}","@@@.@@@.@@@.@@@",$0);print}' < test_secure > /dev/null

real    0m2.163s
user    0m0.611s
sys     0m0.045s
$ sync && sudo purge
$ time teip -og '([0-9]{1,3}\.){3}[0-9]{1,3}' -- awk '{gsub("([0-9]{1,3}\\.){3}[0-9]{1,3}","@@@.@@@.@@@.@@@",$0);print}' < test_secure > /dev/null

real    0m1.355s
user    0m0.606s
sys     0m0.054s
$ sync && sudo purge
$ time teip -og '([0-9]{1,3}\.){3}[0-9]{1,3}' -- awk '{gsub("([0-9]{1,3}\\.){3}[0-9]{1,3}","@@@.@@@.@@@.@@@",$0);print}' < test_secure > /dev/null

real    0m1.349s
user    0m0.605s
sys     0m0.054s
Clone this wiki locally