bat里循环1万次测试时间

发布时间 2023-11-06 22:25:03作者: 牛腩

bat里循环1万次测试时间

 

 

@echo off
 
@echo start: %time%
set /a i=0
:LoopStart
  set /a i+=1
  if %i% leq 10000 goto LoopStart
@echo end: %time%

 



自己的电脑,循环1万次要7,8秒

 

 

 

 

公司服务器的电脑,循环一万次要5秒

 

 

买的华为云服务器1核心2G内存的,竟然比我的电脑7745HX还快, 晕晕。。看来这脚本与内存无关,只与CPU有关啊。。