"Better" in what way? Assuming these are gaming builds? If so, at the pricepoint, I'd look in totally different directions.
$1,500(ish) build:
PCPartPicker part list /
Price breakdown by merchant
CPU: Intel - Core i7-7700K 4.2GHz Quad-Core Processor ($326.88 @ OutletPC)
CPU Cooler: CRYORIG - H7 49.0 CFM CPU Cooler ($27.90 @ Newegg Marketplace)
Motherboard: MSI - Z270-A PRO ATX LGA1151 Motherboard ($90.88 @ OutletPC)
Memory: Corsair - Vengeance LPX 16GB (2 x 8GB) DDR4-2400 Memory ($158.99 @ Amazon)
Storage: SanDisk - X400 256GB 2.5" Solid State Drive ($69.99 @ Newegg Marketplace)
Storage: Western Digital - Blue 1TB 3.5" 5400RPM Internal Hard Drive ($45.99 @ Amazon)
Video Card: Zotac - GeForce GTX 1080 Ti 11GB Mini Video Card ($712.88 @ SuperBiiz)
Power Supply: SeaSonic - S12II 620W 80+ Bronze Certified ATX Power Supply ($41.89 @ Newegg)
Total: $1475.40
Prices include shipping, taxes, and discounts when available
Generated by PCPartPicker 2017-12-12 16:52 EST-0500
While the 8700K is technically "stronger", the CPU+MB pairings work out about 25% more for the 8700K, and you're not gaining anywhere close to 25% in performance improvements..... especially as you move up in resolutions.
The i5-8600K is a very strong "gaming" CPU too, but personally, I don't feel it brings enough to the table.
Works out very similarly to a 7700K (when you factor in a Z370 board), for 6 cores/threads (vs 4/8) and no real 'gains' in gaming across the board.
$1,000
PCPartPicker part list /
Price breakdown by merchant
CPU: AMD - Ryzen 5 1600 3.2GHz 6-Core Processor ($199.89 @ OutletPC)
Motherboard: MSI - B350M PRO-VD PLUS Micro ATX AM4 Motherboard ($51.98 @ Newegg)
Memory: GeIL - SUPER LUCE RGB SYNC 16GB (2 x 8GB) DDR4-3000 Memory ($169.99 @ Newegg)
Storage: SanDisk - X400 256GB 2.5" Solid State Drive ($69.99 @ Newegg Marketplace)
Storage: Hitachi - Ultrastar 1TB 3.5" 7200RPM Internal Hard Drive ($39.80 @ Amazon)
Video Card: EVGA - GeForce GTX 1070 8GB FTW Gaming ACX 3.0 Video Card ($429.99 @ Newegg)
Power Supply: SeaSonic - S12II 620W 80+ Bronze Certified ATX Power Supply ($41.89 @ Newegg)
Total: $1003.53
Prices include shipping, taxes, and discounts when available
Generated by PCPartPicker 2017-12-12 16:56 EST-0500
$500 (ish)
PCPartPicker part list /
Price breakdown by merchant
CPU: AMD - Ryzen 3 1200 3.1GHz Quad-Core Processor ($109.86 @ OutletPC)
Motherboard: MSI - B350M PRO-VD PLUS Micro ATX AM4 Motherboard ($51.98 @ Newegg)
Memory: Corsair - Vengeance LPX 8GB (2 x 4GB) DDR4-3000 Memory ($99.89 @ OutletPC)
Storage: Seagate - BarraCuda 1TB 3.5" 7200RPM Internal Hard Drive ($44.99 @ Amazon)
Video Card: Gigabyte - GeForce GTX 1050 Ti 4GB Video Card ($156.99 @ SuperBiiz)
Power Supply: Corsair - CX (2017) 450W 80+ Bronze Certified ATX Power Supply ($23.98 @ Newegg)
Total: $487.69
Prices include shipping, taxes, and discounts when available
Generated by PCPartPicker 2017-12-12 16:58 EST-0500
You really need faster RAM on Ryzen platforms.
At a ~$500 pricepoint, and SSD really is a luxury that's tough to justify.
THEN, there's the argument of price vs performance.
On the upper-end, paired with a GPU like a 1080 or 1080TI, you really should be pushing higher resolutions where (within reason) the CPU doesn't matter as much.
I'd actually look to pair a Ryzen5 1600 with a 1080TI for either high refresh 1440p or 4K.
PCPartPicker part list /
Price breakdown by merchant
CPU: AMD - Ryzen 5 1600 3.2GHz 6-Core Processor ($199.89 @ OutletPC)
Motherboard: MSI - X370 GAMING PLUS ATX AM4 Motherboard ($96.98 @ Newegg)
Memory: GeIL - SUPER LUCE RGB SYNC 16GB (2 x 8GB) DDR4-3000 Memory ($169.99 @ Newegg)
Storage: SanDisk - X400 256GB 2.5" Solid State Drive ($69.99 @ Newegg Marketplace)
Storage: Western Digital - Blue 1TB 3.5" 5400RPM Internal Hard Drive ($45.99 @ Amazon)
Video Card: Zotac - GeForce GTX 1080 Ti 11GB Mini Video Card ($712.88 @ SuperBiiz)
Power Supply: SeaSonic - S12II 620W 80+ Bronze Certified ATX Power Supply ($41.89 @ Newegg)
Total: $1337.61
Prices include shipping, taxes, and discounts when available
Generated by PCPartPicker 2017-12-12 16:59 EST-0500
For reference, various CPUs with a GTX 1080 at various resolutions. Note, most are at stock speeds, but some are OC'd.
https://www.techpowerup.com/reviews/Intel/Core_i5_8600K/18.html