<p>Pretty much as the question asks. Answers preferably in pseudo code and referenced. The correct answer should value speed over simplicity.</p>

See
Intersections of Rays, Segments, Planes and Triangles in 3D
. You can find ways to triangulate polygons.
If you really need ray/polygon intersection, it's on 16.9 of
Real-Time Rendering
(13.8 for 2nd ed).
We first compute the intersection
  between the ray and [the plane of the
  ploygon]
```
pie_p
```
, which is easily done
  by replacing
```
x
```
by the ray.
```
```
n_p DOT (o + td) + d_p = 0 <=> t = (-d_p - n_p DOT o) / (n_p DOT d)
```
```
If the denominator
```
|n_p DOT d| < epsilon
```
, where
```
epsilon
```
is very small
  number, then the ray is considered
  parallel to the polygon plane and no
  intersection occurs. Otherwise, the
  intersection point,
```
p
```
, of the ray and
  the polygon plane is computed:
```
p = o + td
```
. Thereafter, the problem of
  deciding whether
```
p
```
is inside the
  polygon is reduced from three to two
  dimentions...
See the book for more details.