<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.1" version="1.1">
  <file original="NoName" source-language="en" datatype="plaintext" target-language="zh_Hans">
    <body>
      <trans-unit xml:space="preserve" approved="no" id="e02d65612f073688" weblate-flags="safe-html, strict-same">
        <source>﻿[#hash_quality] = Hash Quality</source>
        <target state="translated">[#hash_quality] = 哈希质量</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">1</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ca0cea8fc702b4a3" weblate-flags="safe-html, strict-same">
        <source>:idprefix: hash_quality_</source>
        <target state="translated">:idprefix: hash_quality_</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">4</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="a7db740e07e9d175" weblate-flags="safe-html, strict-same">
        <source>In order to work properly, hash tables require that the supplied hash function be of __good quality__, roughly meaning that it uses its `std::size_t` output space as uniformly as possible, much like a random number generator would do —except, of course, that the value of a hash function is not random but strictly determined by its input argument.</source>
        <target state="translated">为了正常工作，哈希表要求提供的哈希函数具有__高质量__，这大致意味着它应尽可能均匀地使用其 `std::size++_++t` 输出空间，就像随机数生成器那样——当然，不同之处在于哈希函数的值并非随机，而是由其输入参数严格决定。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">6</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="1fccb1796a28c048" weblate-flags="safe-html, strict-same">
        <source>Closed-addressing containers in Boost.Unordered are fairly robust against hash functions with less-than-ideal quality, but open-addressing and concurrent containers are much more sensitive to this factor, and their performance can degrade dramatically if the hash function is not appropriate. In general, if you're using functions provided by or generated with link:../../../../container_hash/index.html[Boost.Hash^], the quality will be adequate, but you have to be careful when using alternative hash algorithms.</source>
        <target state="translated">Boost.Unordered 中的闭寻址容器对质量不理想的哈希函数具有较好的鲁棒性，但开放寻址和并发容器对此因素更为敏感。如果哈希函数选择不当，其性能会出现显著下降。通常，使用由 link:../../../../container_hash/index.html[Boost.Hash] 提供或生成的函数可确保质量达标，但在使用其他哈希算法时则需要特别谨慎。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">12</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="a32e863ecde870c1" weblate-flags="safe-html, strict-same">
        <source>The rest of this section applies only to open-addressing and concurrent containers.</source>
        <target state="translated">本节剩余的内容仅适用于开放寻址容器与并发容器。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">20</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="acad12c6a60f0697" weblate-flags="safe-html, strict-same">
        <source>Hash Post-mixing and the Avalanching Property</source>
        <target state="translated">哈希后混合处理与雪崩效应属性</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">22</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="e2ead9629101e542" weblate-flags="safe-html, strict-same">
        <source>Even if your supplied hash function does not conform to the uniform behavior required by open addressing, chances are that the performance of Boost.Unordered containers will be acceptable, because the library executes an internal __post-mixing__ step that improves the statistical properties of the calculated hash values. This comes with an extra computational cost; if you'd like to opt out of post-mixing, annotate your hash function as follows:</source>
        <target state="translated">即使提供的哈希函数不符合开放寻址所需的均匀分布特性，Boost.Unordered容器的性能通常仍可接受，这是因为库会执行内部__后混合处理__步骤来改善计算哈希值的统计特性。当然这会带来额外的计算开销；若希望禁用后混合处理功能，请按以下方式对哈希函数进行注解：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">24</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="edb5bf8c35d73f9c" weblate-flags="safe-html, strict-same">
        <source>By setting the `link:../../../../container_hash/doc/html/hash.html#ref_hash_is_avalanchinghash[hash_is_avalanching]` trait, we inform Boost.Unordered that `my_string_hash_function` is of sufficient quality to be used directly without any post-mixing safety net. This comes at the risk of degraded performance in the cases where the hash function is not as well-behaved as we've declared.</source>
        <target state="translated">通过设置 link:../../../../container_hash/doc/html/hash.html#ref_hash_is_avalanchinghash[`hash++_++is++_++avalanching`] 特征，我们告知Boost.Unordered： `my++_++string++_++hash++_++function` 具有足够高的质量，无需任何后混合处理安全网即可直接使用。但这样做的风险在于，如果哈希函数的表现未达到我们声明的理想状态，则可能导致性能下降。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">45</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="fdcd02bc69d2038c" weblate-flags="safe-html, strict-same">
        <source>Container Statistics</source>
        <target state="translated">容器统计信息</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">52</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="b54015fc79180988" weblate-flags="safe-html, strict-same">
        <source>If we globally define the macro `BOOST_UNORDERED_ENABLE_STATS`, open-addressing and concurrent containers will calculate some internal statistics directly correlated to the quality of the hash function:</source>
        <target state="translated">若在全局定义宏 `BOOST++_++UNORDERED++_++ENABLE++_++STATS` ，开放寻址容器与并发容器将计算与哈希函数质量直接相关的内部统计信息：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">54</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="6df5c8426b7d2a87" weblate-flags="safe-html, strict-same">
        <source>The `stats` object provides the following information:</source>
        <target state="translated">`stats` 对象提供以下统计信息：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">75</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="a4cfd5a94a2765a3" weblate-flags="safe-html, strict-same">
        <source>Statistics for three internal operations are maintained: insertions (without considering the previous lookup to determine that the key is not present yet), successful lookups, and unsuccessful lookups (including those issued internally when inserting elements). _Probe length_ is  the number of xref:structures.adoc#structures_open_addressing_containers[bucket groups] accessed per operation. If the hash function behaves properly:</source>
        <target state="translated">系统维护三类内部操作的统计信息：插入操作（不考虑先前查找键是否存在的操作）、成功查找及未命中查找（包括插入元素时触发的内部查询）。__探测长度__是指每次操作所访问的 xref:structures.adoc#structures_open_addressing_containers[桶组] 数量。若哈希函数表现正常：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">108</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="10feb05c4d581c80" weblate-flags="safe-html, strict-same">
        <source>Average probe lengths should be close to 1.0.</source>
        <target state="translated">平均探测长度应接近1.0。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">115</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="01c2634b6edd835e" weblate-flags="safe-html, strict-same">
        <source>The average number of comparisons per successful lookup should be close to 1.0 (that is,</source>
        <target state="translated">每次成功查找的平均比较次数应接近 1.0（即，</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">116</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="66da47bacd10a15d" weblate-flags="safe-html, strict-same">
        <source>just the element found is checked).</source>
        <target state="translated">仅检查找到的那个元素）。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">117</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="de69af9beb0b2e76" weblate-flags="safe-html, strict-same">
        <source>The average number of comparisons per unsuccessful lookup should be close to 0.0.</source>
        <target state="translated">每次失败查找的平均比较次数应接近 0.0。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">118</context>
        </context-group>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="f35ab754dc598bdb" weblate-flags="safe-html, strict-same">
        <source>An link:../../../benchmark/string_stats.cpp[example^] is provided that displays container statistics for `boost::hash&lt;std::string&gt;`, an implementation of the https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function#FNV-1a_hash[FNV-1a hash^] and two ill-behaved custom hash functions that have been incorrectly marked as avalanching:</source>
        <target state="translated">提供了一个链接：../../../benchmark/string_stats.cpp[示例^]，用于展示 `boost::hash&lt;std::string&gt;`、https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function#FNV-1a_hash[FNV-1a 哈希^] 以及两种行为不当但被错误标记为具有雪崩效应的自定义哈希函数的容器统计信息。&lt;/std::string&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile"></context>
          <context context-type="linenumber">120</context>
        </context-group>
      </trans-unit>
    </body>
  </file>
</xliff>
