haskell / criterion

A powerful but simple library for measuring the performance of Haskell code.
http://www.serpentine.com/criterion
BSD 2-Clause "Simplified" License
501 stars 86 forks source link

Make C code work on Intel- and ARM-based Macs #240

Closed RyanGlScott closed 3 years ago

RyanGlScott commented 3 years ago

This applies two tweaks to cycles.c and time-osx.c to ensure that criterion_rdtsc and criterion_gettime work on all versions of macOS, regardless of the architecture being used. In particular, this is required to make criterion-measurement compile and run on Apple silicon.

Fixes #238.

carlocab commented 3 years ago

Thanks, @RyanGlScott! Is there any chance we could get a new release of criterion-measurement on Hackage to fix cabal builds for packages that depend on it?

RyanGlScott commented 3 years ago

I've uploaded criterion-measurement-0.1.3.0 to Hackage.

carlocab commented 3 years ago

Awesome; thanks very much!