当前位置:网站首页>[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
边栏推荐
- Wechat applet distance and map
- Keepalived热备与HAProxy
- Leetcode simple question: check whether two string arrays are equal
- 论文阅读_中文医疗模型_ eHealth
- Messy change of mouse style in win system
- 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
- 联发科技2023届提前批IC笔试(题目)
- Current market situation and development prospect prediction of global direct energy deposition 3D printer industry in 2022
- 2022-02-11 daily clock in: problem fine brush
- [research materials] the fourth quarter report of the survey of Chinese small and micro entrepreneurs in 2021 - Download attached
猜你喜欢

Thesis reading_ Chinese NLP_ ELECTRA
![[tools run SQL blind note]](/img/c3/86db4568b221d2423914990a88eec2.png)
[tools run SQL blind note]

String matching: find a substring in a string

Leetcode simple question: check whether the array is sorted and rotated
![[research materials] 2022q1 game preferred casual game distribution circular - Download attached](/img/13/5a67c5d08131745759fdc70a71cf0f.jpg)
[research materials] 2022q1 game preferred casual game distribution circular - 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

C language self-made Games: Sanzi (tic tac toe chess) intelligent chess supplement

Triangular rasterization

RT thread flow notes I startup, schedule, thread

Introduction to message queuing (MQ)
随机推荐
Interface frequency limit access
Network security textual research recommendation
Realize file download through the tag of < a > and customize the file name
【SQL注入】联合查询(最简单的注入方法)
Market status and development prospect prediction of global neutral silicone sealant industry in 2022
Huawei personally ended up developing 5g RF chips, breaking the monopoly of Japan and the United States
On typescript and grammar
Kept hot standby and haproxy
Silent authorization login and registration of wechat applet
Use Sqlalchemy module to obtain the table name and field name of the existing table in the database
[develop wechat applet local storage with uni app]
Compile and decompile GCC common instructions
The principle is simple, but I don't know how to use it? Understand "contemporaneous group model" in one article
C language self-made Games: Sanzi (tic tac toe chess) intelligent chess supplement
MC Layer Target
[luatos sensor] 1 light sensing bh1750
I stepped on a foundation pit today
[SQL injection] joint query (the simplest injection method)
1114 family property (25 points)
Actual combat 8051 drives 8-bit nixie tube