AMD Ryzen 5 8640HS 's Advantages
Released 11 months late
Higher specification of memory (LPDDR5x-7500 vs DDR5-5600)
Lower TDP (28W vs 35W)
AMD Ryzen 7 7840H 's Advantages
Better graphics card performance
Newer PCIe version (4 vs 4.0)
Higher base frequency (3.8GHz vs 3.5GHz)