Measuring trajectory similarity is a fundamental algorithm in trajectory data mining, playing a key role in trajectory clustering, pattern mining, and classification, for instance. However, existing trajectory similarity measures based on vector representation have challenges in achieving both fast and accurate similarity measurements. On one hand, most existing methods have a high computational complexity of O(nâĂâm), resulting in low efficiency. On the other hand, many of them are sensitive to trajectory sampling rates and lack of accuracy. This article proposes QuadGridSIM, a quadrilateral gridâbased method for trajectory similarity analysis, which enables highâperformance trajectory similarity measure without the cost of low effectiveness. Specifically, we first realize the multiscale coding representation of trajectory data based on quadrilateral discrete grids. Then, a novel trajectory similarity measure is defined to reduce the computational complexity of O(n). Several effectiveness properties of QuadGridSIM are further optimized, including the spatial overlap, directionality, symmetry, and robustness to sampling rate variations. Experimental results based on realâworld and simulated taxi trajectory data indicate that QuadGridSIM outperforms most of the other tested algorithms developed previously in terms of effectiveness, particularly in its robustness regarding trajectory sampling rates. Furthermore, QuadGridSIM exhibits superior performance and is approximately one order of magnitude faster than previous methods in the literature. QuadGridSIM provides a solution to the lowâefficiency problem of massive trajectory similarity analysis and can be applied in many application scenarios, such as route recommendation and suspect detection.