precompute(动词):预先计算;在正式运行、查询或处理之前,先把结果算好并保存,以便后续更快使用。(在计算机科学中常指提前生成“查找表”、缓存结果等。)
/ˌpriːkəmˈpjuːt/
We precompute the values and store them in an array. 我们把这些值预先计算好,并存进一个数组里。
To speed up the program, the engine precomputes a lookup table during initialization, so later queries run in constant time. 为了加速程序,引擎在初始化时预先计算一张查找表,这样后续查询就能以常数时间运行。
由 **pre-**(“在……之前”)+ compute(“计算”)构成,字面意思就是“在之前就把计算做完”。该词常见于算法、性能优化与工程实现的语境中。