V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
bandian
V2EX  ›  问与答

Windows 下编译程序的速度多少有点“快”了

  •  
  •   bandian · Jun 14, 2022 · 953 views
    This topic created in 1418 days ago, the information mentioned may be changed or developed.

    虚拟机装了一个 4G 1 核的 Linux ,物理机的 CPU 是 i7-10700

    Windows 用的是 16G 6 核的 5600x

    都编译下面这段 go 程序

    package main
    
    import (
    	"net/http"
    
    	"github.com/gin-gonic/gin"
    )
    
    func main() {
    	r := gin.Default()
    	r.GET("/", func(c *gin.Context) {
    		c.JSON( http.StatusOK, "hello world")
    	})
    	r.Run(":8080")
    }
    

    Windows 差不多 3s ,Linux 不到 1s😂这河里吗

    sprite82
        1
    sprite82  
       Jun 14, 2022
    公司的 Java 服务,Windows 编译 30s ,Linux 虚拟机 10s
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2634 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 03:41 · PVG 11:41 · LAX 20:41 · JFK 23:41
    ♥ Do have faith in what you're doing.