Higher gigahertz is only better in some cases. In order to compare 2 CPUs, you need to know at least a little bit about their architecture. Cache, number of cores, number of integer and floating point units, number of threads, and more all matter when it comes to the performance of the CPU.
Which ones were you considering or looking at?