<i id='pnox0'><tr id='pnox0'><dt id='pnox0'><q id='pnox0'><span id='pnox0'><b id='pnox0'><form id='pnox0'><ins id='pnox0'></ins><ul id='pnox0'></ul><sub id='pnox0'></sub></form><legend id='pnox0'></legend><bdo id='pnox0'><pre id='pnox0'><center id='pnox0'></center></pre></bdo></b><th id='pnox0'></th></span></q></dt></tr></i><div id='pnox0'><tfoot id='pnox0'></tfoot><dl id='pnox0'><fieldset id='pnox0'></fieldset></dl></div>
        <tfoot id='pnox0'></tfoot>

        <small id='pnox0'></small><noframes id='pnox0'>

        • <bdo id='pnox0'></bdo><ul id='pnox0'></ul>

      1. <legend id='pnox0'><style id='pnox0'><dir id='pnox0'><q id='pnox0'></q></dir></style></legend>

        什么是 uint_fast32_t,为什么要使用它而不是常规的 int 和 uint32_t?

        What is uint_fast32_t and why should it be used instead of the regular int and uint32_t?(什么是 uint_fast32_t,为什么要使用它而不是常规的 int 和 uint32_t?)
      2. <tfoot id='4heSc'></tfoot>
            <bdo id='4heSc'></bdo><ul id='4heSc'></ul>
            <i id='4heSc'><tr id='4heSc'><dt id='4heSc'><q id='4heSc'><span id='4heSc'><b id='4heSc'><form id='4heSc'><ins id='4heSc'></ins><ul id='4heSc'></ul><sub id='4heSc'></sub></form><legend id='4heSc'></legend><bdo id='4heSc'><pre id='4heSc'><center id='4heSc'></center></pre></bdo></b><th id='4heSc'></th></span></q></dt></tr></i><div id='4heSc'><tfoot id='4heSc'></tfoot><dl id='4heSc'><fieldset id='4heSc'></fieldset></dl></div>

                  <tbody id='4heSc'></tbody>
              1. <small id='4heSc'></small><noframes id='4heSc'>

                • <legend id='4heSc'><style id='4heSc'><dir id='4heSc'><q id='4heSc'></q></dir></style></legend>
                  本文介绍了什么是 uint_fast32_t,为什么要使用它而不是常规的 int 和 uint32_t?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  所以 typedef:ed 原始数据类型的原因是为了抽象低级表示并使其更容易理解(uint64_t 而不是 long long 类型,即 8 个字节).

                  So the reason for typedef:ed primitive data types is to abstract the low-level representation and make it easier to comprehend (uint64_t instead of long long type, which is 8 bytes).

                  但是,uint_fast32_tuint32_t 具有相同的 typedef.使用快速"版本会使程序更快吗?

                  However, there is uint_fast32_t which has the same typedef as uint32_t. Will using the "fast" version make the program faster?

                  推荐答案

                  • int 在某些平台上可能小到 16 位.它可能不足以满足您的应用需求.
                  • uint32_t 不保证存在.它是一个可选的 typedef,如果它具有恰好 32 位的无符号整数类型,则实现必须提供它.例如,有些具有 9 位字节,因此它们没有 uint32_t.
                  • uint_fast32_t 清楚地说明了您的意图:这是一种至少 32 位的类型,从性能的角度来看是最好的.uint_fast32_t 实际上可能是 64 位长.这取决于实施.
                    • int may be as small as 16 bits on some platforms. It may not be sufficient for your application.
                    • uint32_t is not guaranteed to exist. It's an optional typedef that the implementation must provide iff it has an unsigned integer type of exactly 32-bits. Some have a 9-bit bytes for example, so they don't have a uint32_t.
                    • uint_fast32_t states your intent clearly: it's a type of at least 32 bits which is the best from a performance point-of-view. uint_fast32_t may be in fact 64 bits long. It's up to the implementation.
                    • ... 有 uint_fast32_tuint32_t 具有相同的 typedef ...

                      ... there is uint_fast32_t which has the same typedef as uint32_t ...

                      你看的不是标准.这是一个特定的实现(黑莓).所以你不能从那里推断出 uint_fast32_t 总是与 uint32_t 相同.

                      What you are looking at is not the standard. It's a particular implementation (BlackBerry). So you can't deduce from there that uint_fast32_t is always the same as uint32_t.

                      另见:

                      • 标准委员会关心的异国架构.

                      我对 C 和 C++ 中整数类型的基于意见的实用观点.

                      这篇关于什么是 uint_fast32_t,为什么要使用它而不是常规的 int 和 uint32_t?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                      本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What is inside .lib file of Static library, Statically linked dynamic library and dynamically linked dynamic library?(静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么?)
                  How do I load a C DLL from the SXS in Python?(如何从 Python 中的 SXS 加载 C DLL?)
                  Can Cython code be compiled to a dll so C++ application can call it?(Cython 代码可以编译成 dll 以便 C++ 应用程序可以调用它吗?)
                  Delay Loading DLLs(延迟加载 DLL)
                  Throwing C++ exceptions across DLL boundaries(跨 DLL 边界抛出 C++ 异常)
                  Loading a dll from a dll?(从 dll 加载 dll?)
                  <i id='mWUtB'><tr id='mWUtB'><dt id='mWUtB'><q id='mWUtB'><span id='mWUtB'><b id='mWUtB'><form id='mWUtB'><ins id='mWUtB'></ins><ul id='mWUtB'></ul><sub id='mWUtB'></sub></form><legend id='mWUtB'></legend><bdo id='mWUtB'><pre id='mWUtB'><center id='mWUtB'></center></pre></bdo></b><th id='mWUtB'></th></span></q></dt></tr></i><div id='mWUtB'><tfoot id='mWUtB'></tfoot><dl id='mWUtB'><fieldset id='mWUtB'></fieldset></dl></div>

                      <tbody id='mWUtB'></tbody>

                        <bdo id='mWUtB'></bdo><ul id='mWUtB'></ul>
                        <legend id='mWUtB'><style id='mWUtB'><dir id='mWUtB'><q id='mWUtB'></q></dir></style></legend>

                        <tfoot id='mWUtB'></tfoot>
                          • <small id='mWUtB'></small><noframes id='mWUtB'>