They are very different cars. Depends on your wants/needs. Plenty of threads comparing the Cayman and M3 if you search.
I drove the 2012 Cayman S extensively before making my decision for the M3. The Cayman has a ton of strong points (handling, manual tranny, etc), but to me it felt unpractical and underpowered after stepping out of the M3.
Are you planning to DD the car? That might help your decision as well.
Another thing to consider is that new models always have a few kinks to work out...if you do some research, you'll find that early Caymans had quite a few issues. A roll of the dice...I'd personally wait until mid-cycle at least (or for the new R).
It's a fun decision to make. Happy hunting.