Although there may be a performance difference between a 5400 RPM and a 7200 RPM drive, the speed difference between the two shouldn't be drastic. If you're noticing a huge difference between your old iMac and your new one then I suggest checking some additional items before taking steps to replace your iMac with an SSD model:
1) Temporarily disconnect and additional peripherals besides the keyboard and mouse. (e.g. external hard drives, thumb drives, printer, etc.) and reboot. If the performance improves try reconnecting the peripherals one at a time.
2) Is your iMac creating the Spotlight index to make searching for documents easier? Indexing can be a lengthy process, but once completed will have a minimal impact on your iMac's performance. To check whether the indexing is in process first launch the Activity Monitor application found in the Applications/Utilities folder. Next, select the CPU Tab and click on the Process Name column to sort alphabetically. Look for a process named 'mdworker'. If you see that the 'mdworker' process is consuming a fair amount of processor time then the Spotlight indexing is in process and the system performance will likely improve once it has completed.
3) If you continue to have performance issues then it would be helpful to upload an Etrecheck report to see whether there are any other issues that need addressing.
https://etrecheck.com/