跳转到内容

Runtime

“Runtime” 可作名词或形容词。名词指程序执行的时间段或提供执行支持的环境(如 Java Runtime、Node.js runtime);形容词指在运行时才发生的行为,如 runtime error(运行时错误)、runtime configuration。

  1. “This bug only appears at runtime, not during compilation.” (这个 bug 只在运行时出现,编译时没有。)
  2. “The WebAssembly runtime loads the module in milliseconds.” (WebAssembly 运行时几毫秒内加载模块。)
  3. “Runtime memory usage spiked after the cache was enabled.” (启用缓存后运行时内存占用飙升。)

由 run(运行)+ time(时间)复合而成,直译“运行之时”。

复合词,无传统词缀;run + time 表示程序实际执行的阶段。

开发者常区分 compile-time vs runtime;容器镜像常捆绑特定 language runtime;runtime exception 是调试中的常见类别。

  • 固定搭配: “runtime error” (运行时错误), “runtime environment” (运行时环境), “at runtime” (在运行时)
  • 反义概念: compile-time

“run” + “time”:程序 run 起来的那段 time——runtime。

“At runtime, the plugin discovered the config file was missing and exited gracefully.” (运行时插件发现配置文件缺失,并优雅退出。)