Side Notes: There are several early off we could do such as quite finding intersections after finding one intersection for the ray, or deny the intersection between ray and sphere without thoroughly solving it.
Time used : 0.872193 seconds
Processor : Intel(R) Core(TM) i7-8750H CPU @ 2.20 GHz
Memory : 16.0G
Operating System: 64-bit OS, x64-based processor