<div dir="auto">Please explain how to reproduce your benchmark. Maybe write a shell script?<div dir="auto"><br></div><div dir="auto">Victor</div></div><div class="gmail_extra"><br><div class="gmail_quote">Le 9 juil. 2017 17:49, "Bhavishya" <<a href="mailto:bhavishyagopesh@gmail.com">bhavishyagopesh@gmail.com</a>> a écrit :<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hello,<br><br></div>1).I was going through the code of <b>python pickle</b> to search any optimization possibility.But the only thing that I found very alarming was again the import time(I tried with lazy-import but it didn't helped much.)<br><br></div>I found py3 to be ~45 times slower on<b> initial imports(very raw measure..using "time." ) </b>as compared to py2 on an usual example.<br><br></div>py3-><br>./python -c '<br>favorite_color = { "lion": "yellow", "kitty": "red" }<br>pickle.dump( favorite_color, open( "save.p", "wb" ) )'<br></div><div>0.009715557098388672(time taken to do initial imports...measured using <b>time.time()</b> )<br></div><div><br></div>py2-><br></div>./python -c '<br>favorite_color = { "lion": "yellow", "kitty": "red" }<br>pickle.dump( favorite_color, open( "save.p", "wb" ) )'<div>0.000236034393311(time taken to do initial imports...measured using <b>time.time()</b> )<br><br></div><div>Do you have any thought/ideas on improving this?<br><br><br></div><div>Thank You.<br></div></div>
<br>______________________________<wbr>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/victor.stinner%40gmail.com" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/options/python-dev/<wbr>victor.stinner%40gmail.com</a><br>
<br></blockquote></div></div>