Memory Requirement of a RayCast

I am going to develop a game in which the AI preforms several RayCasts at the same time. Will this slow down my game, or will it be okay?

I tested 256 blocks casting 10 rays each per frame; raycasting could be enabled or disabled. With raycasting disabled, deltaTime was around 15.7 mS. When enabled, it rose to 21.8 mS. Since there were 2560 raycasts by frame, the time taken by each one was about 2.38 uS.

This benchmark run in my notebook (1.8GHz Intel Core Duo, not the fastest machine in the world), and in the Editor. Maybe in Standalone mode it run faster, but I don’t think the difference will be too significant.

Anyway, it would be necessary about 400 raycasts to increase the frame time by 1mS, so I think you will not have too much problem with your 50 raycasts in any PC.