The HP is a lot better than the desktop and it is also a bit better than the Lenovo laptop. The HP has a 7th generation CPU and integrated graphics core. The Lenovo has a 3rd generation GPU and integrated graphics core.
Newer generation CPUs are generally better than older generation CPUs because of overall improvements to the design. Performance improvements are incremental from one generation to the next (typically about 5%) assuming the same clockspeed. Therefore, assuming the same clockspeed, a 7th gen Intel CPU is generally about 22% more powerful 3rd generation Intel CPU.
Integrated graphics performance has also improved so if you find that for some reason you want to play a game, but you only have a laptop the Intel HD 620 would provide better performance than the older Intel HD 4000. Though integrated graphics is still weak compared to dedicated GPUs.