I think it has to do with memory clocks on the cards. AMD RX 580 clocks top out at ~2100 MHz, while Nvidia clocks run at more than 5000 MHz.
so ETH requires more the core clock which is close between the cards, ZEC uses both (core + memory) and there Nvidia comes in advantage because of high memory clock.
wondering if some miners could be optimized for core that AMD cards can raise their S/s.
Actually ETH runs better with a lower core clock speed compared to ZEC. It also must be something about the difference in memory architecture. My MSI 1080 Gaming X will do ~560 H/s on ZEC, but only ~25 MH/s on ETH. The difference is the 1080's use GDDR5X, while the 1070's use GDDR5 like the RX 580. The 1070's also run at a higher core clock compared to the RX 580's.
ZEC is core count and speed dependent so Nvidia does better at it. ETH is memory bandwidth and speed dependent and so AMD's lower core count/speed does not impact it much. The memory numbers you see reported as 7000 or 8000mhz are just 4x of the actual memory clocks of 1750-2000mhz. Both AMD and NVIDIA use essentially the same GDDR5 memory - similar chips similar clocks.