Exactly. A codec describes the storage format and rendering steps for lossy video data. A decoder can process the stored graphic entities and render a correct output. This step is relatively straight forward. The encoding step on the other hand has a much larger search space, and since it's lossy in nature, and has many tunables, algorithms and accuracy/speed/size trade-offs. Typically these "superfast" and "fast" presets will make many adjustments to these tunings to reduce the encoding time, but these generally also reduce the video quality and/or video size output (as you've shown in your test case). Then there may also be tuning profiles that operate better on for example cartoons, fairly static video or fast moving video.
For example, H265
can be far more efficient for videos with large frame sizes. H265 has introduced some larger video region sizes which can be described I believe, and hence is more effective for 1080p or 4K resolutions that has a greater probability of "low entropy" video zones. There was a time that x265 was not considered to be an interesting alternative to x264, but that was years ago. I think these days, the output quality is typically comparable for often half the file size. I would recommended choosing a quality setting right now, since it's not recommended to iterate the encoding for a video over and over again (e.g. video source with high bitrate > H265 "Super fast" > H265 "Fast'), etc. The encoding artifacts for any file are present, and you will likely not see much improvement (if not an increase of file size) if you decide to reencode it in the future.
I prefer H265 CPU encoding using Handbrake as well using the superfast preset with a constant-quality of 22 (variable bitrate allows static scenes, which have little entropy, to be encoded efficiently, while fast moving scenes with more entropy get their fair share of the "pie").
E.g. your very fast and fast benchmark yielded roughly 200MB saved on a file of 500 - 700MB, but I suspect that these settings may have taken 50% of 100% longer to complete. Comparing to the original size of 3GB, you've already gotten a massive fileshrink, so IMO there is little reason to squeeze the last 200MB out of it.
If you do choose to use x265 CPU encoding, I would recommended getting a CPU with modern AVX instructions I upgraded from an Ivy Bridge i5 3570k to a Ryzen 3900X, and saw up to 8x speed improvement in video encoding. Sure that Ryzen chip has 3x more cores and 6x the thread count, and many generations of IPC improvement, but also a far more modern vector instructions.
For example,
the 2700X vs 3700X is about 33% faster in x265, while typical multi-threading benchmarks show "only" 15 - 20% speed improvement between these 2 chips.