为什么在Windows上运行的.NET程序在Linux上运行相同的程序?

发布于 2025-01-24 17:26:32 字数 343 浏览 1 评论 0原文

我正在基准在Windows-X64和Ubuntu.x64上进行一些非常简单的非IO操作。

给定相同的HW,相同的负载等。Windows的表现胜过速度约为30%。

I基准的操作是JSON序列化/避免,基本和并发收集查找,添加,删除等。

我构建Linux程序的方式是使用命令行

dotnet Publish app.sln - 框架net6.0 - configuration Release - - Runtime Ubuntu.20.04-X64

我在一些博客中读到这是典型的,没有什么可惊讶的。有人可以确认,否认或提出线索吗?

I am benchmarking some very simple non IO operations on windows-x64 and ubuntu.x64.

Given same HW, same load, etc.. Windows outperforms and runs around 30% faster.

The operations I benchmark are Json serialise/deserialise, basic and concurrent collection lookup, addition, deletion, etc..

The way I build the linux program is using command line

dotnet publish App.sln —-framework net6.0 —-configuration Release
-—runtime ubuntu.20.04-x64

I have read in some blogs that this is typical and nothing to be surprised about. Can someone please confirm or deny or give a clue what’s happening?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文