New iMac 27" is extremely slow when running code


I recently purchased a new (2020 version) iMac 27" with a 16gb ram. I had the exact same computer but an older version (2017) that am upgrading from.

I was very surprised to see that running the exact same code on both machines, with the latest version of Jupyter/ python, the newer iMac is about three times slower than my old one!

I mean that quite literally, as I can run the same code on my old computer three times before the new one finishes.

After hours of research, I am stumped as to way this is happening. Any advice on how I could boost the speed to run code on my newer computer?

Thank you

Is there a better place to ask this question? Thanks!

Presently, we know very little about your setup other than “an imac,” and can’t help much.

  • How did you install your tools? pip? conda? homebrew?
  • What packages are installed? What are their versions?
  • Did the processor change? Are you now running under emulation?
  • Can you show an example of the code in question?

In the absence of those, I recommend:

  • start with a clean Mambaforge
    • if you do have an M1, perhaps use 4.12.0-2, see this issue
  • start with a clean environment (not the base)
    • built from mamba env update environment.yml containing the packages you want

And try with those.