2.7L Boxster vs. Z4 3.0i? Hmm, that's a tricky one. I'd say the Boxster, you have the edge in power, lighter weight, and probably slightly stiffer suspension. That's assuming you have a more recent model tho, the 2000 2.7L might be a bit down at least in a straight line. I drove a 3.0i for a weekend last year, it was pretty fun but not quite the power. The car had quite a bit more roll tho, and the steering wasn't nearly as sharp.
My advice, get a Boxster S and there's no competition

Unless it's a Z4M, then you better hope for lots of corners
-David