与 32 位相比,64 位对于 Visual Studio Code 的可量化优势是什么? [英] What is the quantifiable benefit of 64 bit for Visual Studio Code over 32 bit

查看:31
本文介绍了与 32 位相比,64 位对于 Visual Studio Code 的可量化优势是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不是硬件专家,但我知道 64 位版本问题请求中的 Visual Studio 被 Microsoft 拒绝,声明 64 位版本不会有良好的性能.

I'm not a hardware guy, but I know that Visual Studio in a 64 bit version issue request was declined by Microsoft stating that a 64 bit version would not have good performance.

我觉得两者之间的两个明显差异是代码库.一个人在 1997 年开始了它的生活,有人会认为这意味着 Visual Studio 方面有更多的负担,拥有非常现代的应用程序架构和代码的机会更少,这可能会使它变得更难,并且可能构建的东西可以在 32 位上执行,对于某些人来说不适合64位的原因是什么?我不知道.

Two noticeable differences between the two that I feel are obvious is the code base. One began it's life in 1997, one would think that means more baggage on the Visual Studio side, less opportunities to have very modern application architecture and code and that may make it harder and possibly stuff may be built to perform on 32 bit and for some reason is not suitable for 64 bit? I don't know.

另一方面,Visual Studio Code 是一个现代的 Electron 应用程序,这意味着它几乎只是编译了 HTML.CSS 和 JavaScript.我敢打赌,制作一个 Visual Studio Code 版本不会有什么障碍,虽然性能可能不是真正引人注目的,为什么不呢?

Visual Studio Code on the other hand is an modern Electron app which means it pretty much just compiled HTML. CSS and JavaScript. I'm betting making a version of Visual Studio Code has little in the way of obstructions and although performance may not be something truly noticeable, why not?

附言

我仍然想了解哪些方面的性能可以改进,以及这种改进对开发人员来说是否可以忽略不计.您可能知道的任何其他信息或有趣的事实都很棒,我希望获得尽可能多的信息,我将使用我发现的任何未提及的确凿事实更新问题.

推荐答案

64 位 Visual Studio Code 的存在很大程度上是 Node.js- 和基于 Chromium 的运行时Electron 支持 32 位和 64 位架构,这不是应用程序的主要设计目标.Microsoft 使用 Electron 开发了 VS Code,这是一个用于使用 Web 技术构建桌面应用程序的框架.

The existence of 64-bit Visual Studio Code is largely a side-effect of the fact that the Node.js- and Chromium-based runtimes of Electron support both 32- and 64-bit architectures, not a primary design goal for the application. Microsoft developed VS Code with Electron, a framework used to build desktop applications with web technologies.

因为 Electron 已经包含了适用于两种架构(以及适用于不同操作系统)的运行时,所以 VS Code 可以提供两个版本而无需额外的努力——Electron 从 JavaScript 代码中抽象出机器之间的差异.

Because Electron already includes runtimes for both architectures (and for different operating systems), VS Code can provide both versions with little additional effort—Electron abstracts the differences between machines from the JavaScript code.

相比之下,Microsoft 将大部分 Visual Studio 分发为包含机器特定指令的编译二进制文件,并且重写和维护 64 位源代码的成本历来超过任何好处.一般来说,如果 64 位程序从不超过 32 位系统的限制,那么它对最终用户来说并不比 32 位程序明显快.Visual Studio 的 IDE shell 没有做太多繁重的工作——典型工作流中的大部分昂贵处理都是由通常支持 64 位系统的集成工具链(编译器等)执行的.

By contrast, Microsoft distributes much of Visual Studio as compiled binaries that contain machine-specific instructions, and the cost of rewriting and maintaining the source code for 64-bits historically outweighed any benefits. In general, a 64-bit program isn't noticeably faster to the end user than its 32-bit counterpart if it never exceeds the limitations of a 32-bit system. Visual Studio's IDE shell doesn't do much heavy-lifting—the bulk of the expensive processing in a typical workflow is performed by the integrated toolchains (compilers, etc.) which usually support 64-bit systems.

考虑到这一点,我们从运行 64 位版本的 VS Code 中可能注意到的任何好处与我们从使用 64 位 Web 浏览器中看到的好处相似.最重要的是,64 位版本可以处理超过 4 GB 的内存,如果我们需要同时打开大量文件或非常大文件,这可能很重要,或者如果我们使用许多扩展.所以—对我们开发人员来说最重要的是—编辑器在滥用时不会耗尽内存.

With this in mind, any benefits we may notice from running a 64-bit version of VS Code are similar to those we would see from using a 64-bit web browser. Most significantly, a 64-bit version can address more than 4 GB of memory, which may matter if we need to open a lot of files simultaneously or very large files, or if we use many heavy extensions. So—most important to us developers—the editor won't run out of memory when abused.

虽然这听起来像是一项值得签署的保险单,但即使我们从未达到这些内存限制,请记住,64 位应用程序通常比 32 位应用程序消耗更多内存.如果我们需要较小的内存占用,我们可能希望选择 32 位版本.大多数开发者可能永远不会达到 4 GB 的上限.

While this sounds like an insurance policy worth signing, even if we never hit those memory limits, remember that 64-bit applications generally consume more memory than their 32-bit counterparts. We may want to choose the 32-bit version if we desire a smaller memory footprint. Most developers may never hit that 4 GB wall.

在极少数情况下,如果我们使用包装本机代码(如为特定架构构建的 DLL)的扩展,我们可能需要选择 32 位或 64 位版本.

In rare cases, we may need to choose either a 32-bit or 64-bit version if we use an extension that wraps native code like a DLL built for a specific architecture.

我们在使用 64 位版本的 VSCode 时遇到的任何其他后果,无论是正面的还是负面的,都取决于 Electron 的底层运行时组件的版本以及它们运行的​​操作系统.这些特征随着开发的进行而不断变化.出于这个原因,很难笼统地说 32 位或 64 位版本优于另一个.

Any other consequences, positive or negative, that we experience from using a 64-bit version of VSCode depend on the versions of Electron's underlying runtime components and the operating system they run on. These characteristics change continuously as development progresses. For this reason, it's difficult to state in a general manner that the 32-bit or 64-bit versions outperform the other.

例如,V8 JavaScript 引擎过去禁用了今天启用的 64 位系统上的一些优化.某些优化只有在操作系统为其提供便利时才可用.

For example, the V8 JavaScript engine historically disabled some optimizations on 64-bit systems that are enabled today. Certain optimizations are only available when the operating system provides facilities for them.

Windows 上的未来 64 位版本可能会利用地址空间布局随机化来提高安全性(地址空间中的更多位会增加熵).

Future 64-bit versions on Windows may take advantage of address space layout randomization for improved security (more bits in the address space increases entropy).

对于大多数用户来说,这些细微差别真的无关紧要.选择与您的系统架构相匹配的版本,并仅在遇到问题时才保留切换.编辑器的更新将继续为其底层组件带来优化.如果资源使用是一个大问题,您可能不想首先使用 GUI 编辑器.

For most users, these nuances really don't matter. Choose a version that matches the architecture of your system, and reserve switching only if you encounter problems. Updates to the editor will continue to bring optimizations for its underlying components. If resource usage is big concern, you may not want to use a GUI editor in the first place.

这篇关于与 32 位相比,64 位对于 Visual Studio Code 的可量化优势是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆