So I have been testing the M1 recently to make sure all our development tools work fine, most of them do apart from no MySQL 5.7 docker image, which is a known issue and easy to workaround.
The other issue I am having though is very strange and I am not able to figure out the cause, however, I don't know anyone else with an M1 to check if there is something wrong with my machine or it affects every M1.
Would someone be able to test something for me?
At work we have a horrible shell script that loops through a load of template files and runs
On my Intel MBP, this takes about 6 minutes to run, on the M1 MBP it takes nearly 25 minutes to run!
I have done a very stripped down version of this script https://github.com/REBELinBLUE/test
If I run
on a 2.2 GHz 6-Core Intel Core i7 with 16 GB of RAM I get
i.e. it takes about 16 seconds to run.
If I run it on the M1 MBP with 16GB of RAM I get
Over 50 seconds, consistently, every single time. Several of my colleagues tried on their Intel MBPs and are all getting similar results to the 16s
We are hopefully replacing this script soon anyway as it is horrific but I am shocked about the massive performance difference and was wondering if it is this machine having problems or all M1 Macs
The other issue I am having though is very strange and I am not able to figure out the cause, however, I don't know anyone else with an M1 to check if there is something wrong with my machine or it affects every M1.
Would someone be able to test something for me?
At work we have a horrible shell script that loops through a load of template files and runs
sed
on them, replacing placeholders with different values.On my Intel MBP, this takes about 6 minutes to run, on the M1 MBP it takes nearly 25 minutes to run!
I have done a very stripped down version of this script https://github.com/REBELinBLUE/test
If I run
sh -c "time ./test.sh"
on a 2.2 GHz 6-Core Intel Core i7 with 16 GB of RAM I get
Code:
❯ sh -c "time ./test.sh"
real 0m16.187s
user 0m2.187s
sys 0m6.264s
i.e. it takes about 16 seconds to run.
If I run it on the M1 MBP with 16GB of RAM I get
Code:
❯ sh -c "time ./test.sh"
real 0m52.319s
user 0m3.267s
sys 0m14.932s
Over 50 seconds, consistently, every single time. Several of my colleagues tried on their Intel MBPs and are all getting similar results to the 16s
We are hopefully replacing this script soon anyway as it is horrific but I am shocked about the massive performance difference and was wondering if it is this machine having problems or all M1 Macs
sed
of course is compiled for arm
Code:
❯ file /usr/bin/sed
/usr/bin/sed: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]
/usr/bin/sed (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/bin/sed (for architecture arm64e): Mach-O 64-bit executable arm64e
Last edited: