当前位置:网站首页>[backtrader source code analysis 5] rewrite several time number conversion functions in utils with Python
[backtrader source code analysis 5] rewrite several time number conversion functions in utils with Python
2022-07-03 04:56:00 【Yunjinqi】
The result of optimization
begin to compare python date2num and cython date2num
The start time is converted into a number
run 10000000 Time , The cycle time is :0.07014679908752441,cython Time consuming :2.2787744998931885,python The time spent is :5.630713939666748, Calculate the multiple of partial promotion :2.470939507147668
begin to compare python time2num and cython time2num
The start time is converted into a number
run 10000000 Time , The cycle time is :0.06908607482910156,cython Time consuming :1.1824824810028076,python The time spent is :2.6439661979675293, Calculate the multiple of partial promotion :2.2359453441756756
begin to compare python num2date and cython num2date
Start converting numbers into time
run 10000000 Time , The cycle time is :0.06380581855773926,cython Time consuming :6.739114761352539,python The time spent is :11.535799741744995, Calculate the multiple of partial promotion :1.7117678137639791
begin to compare python num2dt and cython num2dt
Start converting numbers into time
run 10000000 Time , The cycle time is :0.06438589096069336,cython Time consuming :8.041357517242432,python The time spent is :12.644205570220947, Calculate the multiple of partial promotion :1.5723968923293115
cython_func.pyx Code
边栏推荐
- Thesis reading_ Chinese NLP_ ELECTRA
- String matching: find a substring in a string
- Unity tool Luban learning notes 1
- Shell script -- condition judgment
- MediaTek 2023 IC written examination approved in advance (topic)
- Huawei personally ended up developing 5g RF chips, breaking the monopoly of Japan and the United States
- Silent authorization login and registration of wechat applet
- 5-36v input automatic voltage rise and fall PD fast charging scheme drawing 30W low-cost chip
- 《牛客刷verilog》Part II Verilog进阶挑战
- 2022-02-12 daily clock in: problem fine brush
猜你喜欢
[research materials] 2021 China's game industry brand report - Download attached
[set theory] relation properties (reflexivity | reflexivity theorem | reflexivity | reflexivity theorem | example)
[research materials] annual report of China's pension market in 2021 - Download attached
The consumption of Internet of things users is only 76 cents, and the price has become the biggest obstacle to the promotion of 5g industrial interconnection
RT thread flow notes I startup, schedule, thread
论文阅读_中文NLP_ELECTRA
Actual combat 8051 drives 8-bit nixie tube
5-36v input automatic voltage rise and fall PD fast charging scheme drawing 30W low-cost chip
Online VR model display - 3D visual display solution
Number of 1 in binary (simple difficulty)
随机推荐
[luatos sensor] 1 light sensing bh1750
Market status and development prospect prediction of global fermentation acid industry in 2022
Market status and development prospect prediction of global colorimetric cup cover industry in 2022
Do you know UVs in modeling?
Objects. Requirenonnull method description
Market status and development prospect prediction of global fermented plant protein industry in 2022
论文阅读_中文医疗模型_ eHealth
带有注意力RPN和多关系检测器的小样本目标检测网络(提供源码和数据及下载)...
Leetcode simple question: check whether two string arrays are equal
Shell script Basics - basic grammar knowledge
I've seen a piece of code in the past. I don't know what I'm doing. I can review it when I have time
"Niuke brush Verilog" part II Verilog advanced challenge
Kept hot standby and haproxy
Market status and development prospect forecast of global heat curing adhesive industry in 2022
Notes | numpy-11 Array operation
论文阅读_中文NLP_ELECTRA
[XSS bypass - protection strategy] understand the protection strategy and better bypass
The programmer resigned and was sentenced to 10 months for deleting the code. JD came home and said that it took 30000 to restore the database. Netizen: This is really a revenge
Hire cashier (differential constraint)
Career planning of counter attacking College Students