Frequency accompanies your processor. Your processor will receive interpreted code that's stored in ram. The higher the frequency, the faster the processor can save and retrieve the code (binary) from the ram.
Latency is the short delay before the processor can retrieve information from ram.
In conclusion, ram with better latency will be faster ram. Ram with a higher frequency is better for the processor. To answer your question on which performs better, it depends on which you are aiming for- a faster cpu, or faster ram.