Testing inclusions of a point in a polygon is an important element of various computer models used in architectural acoustics. In this paper, an algorithmic representation of such a test is presented. Different forms of the algorithm are discussed and the form suitable for convex polygons is optimized from a viewpoint of execution time. A room shape analysis is employed to obtain an additional improvement of the algorithm efficiency. The concept of a preliminary checking of a point position prior to the main test execution is also discussed. Altogether, c. 60% reduction of execution time is obtained. Though the algorithms discussed are the ray method oriented, they can also be applied to other methods of sound field modelling in bounded spaces.