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

      <bdo id='I5M94'></bdo><ul id='I5M94'></ul>

    <tfoot id='I5M94'></tfoot>
    <legend id='I5M94'><style id='I5M94'><dir id='I5M94'><q id='I5M94'></q></dir></style></legend>

      <i id='I5M94'><tr id='I5M94'><dt id='I5M94'><q id='I5M94'><span id='I5M94'><b id='I5M94'><form id='I5M94'><ins id='I5M94'></ins><ul id='I5M94'></ul><sub id='I5M94'></sub></form><legend id='I5M94'></legend><bdo id='I5M94'><pre id='I5M94'><center id='I5M94'></center></pre></bdo></b><th id='I5M94'></th></span></q></dt></tr></i><div id='I5M94'><tfoot id='I5M94'></tfoot><dl id='I5M94'><fieldset id='I5M94'></fieldset></dl></div>
      1. 如何在性能方面比较 python 函数?

        How do I compare python functions in terms of performance?(如何在性能方面比较 python 函数?)
          <bdo id='DpYoz'></bdo><ul id='DpYoz'></ul>

        • <small id='DpYoz'></small><noframes id='DpYoz'>

          <legend id='DpYoz'><style id='DpYoz'><dir id='DpYoz'><q id='DpYoz'></q></dir></style></legend>
                <tbody id='DpYoz'></tbody>

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

                • 本文介绍了如何在性能方面比较 python 函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我已经编写了 2 个功能完全相同的功能,但我不知道哪个更快更好.如何比较这两个函数,看看哪一个在性能和所有方面都更好?

                  I have written 2 functions doing the exact same thing, but I don't know which one is faster and better. How do I compare these 2 functions to see which one is better in terms of performance and everything?

                  推荐答案

                  timeit 模块就可以了.

                  The timeit module will do ya.

                  这篇关于如何在性能方面比较 python 函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  What happens when you compare 2 pandas Series(当你比较 2 个 pandas 系列时会发生什么)
                  Quickly find differences between two large text files(快速查找两个大文本文件之间的差异)
                  Python - Compare 2 files and output differences(Python - 比较 2 个文件和输出差异)
                  Why do comparisions between very large float values fail in python?(为什么在 python 中非常大的浮点值之间的比较会失败?)
                  Dictionary merge by updating but not overwriting if value exists(字典通过更新合并,但如果值存在则不覆盖)
                  Find entries of one text file in another file in python(在python中的另一个文件中查找一个文本文件的条目)

                    <tfoot id='1S7af'></tfoot>
                        <bdo id='1S7af'></bdo><ul id='1S7af'></ul>

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

                          <small id='1S7af'></small><noframes id='1S7af'>

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