RayCast with distnace vs LineCast

Is there any difference between them?
Performance?, implementation?, even conceptually?

(I suspect that linecast is macro that use raycast)
Thanks

A ray is really just an alternative way to specify the endpoints of a line. The two functions are identical in most other respects.