Raycast2D node vs code?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Wurzelpilz

How efficient/optimized are those nodes? Is it better to write an own raycast via code if for example 100 enemies are on screen each one with 10 raycasts?