macOS program detect Rosetta
Major projects with CPU arch-specific code take a while to implement new CPU architectures. Apple Silicon is a key example. For example, Anaconda Python has Intel and Apple Silicon installers. Check if a C++, GNU Octave, Matlab, or Python executable on Apple Silicon is using native or Rosetta.
Reference: Apple sysctl