<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2014-09-24 14:42 GMT+02:00 Chirayu Chiripal <span dir="ltr"><<a href="mailto:chirayu.chiripal@gmail.com" target="_blank">chirayu.chiripal@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5">On Wed, Sep 24, 2014 at 5:54 PM, Madhura Jayaratne <span dir="ltr"><<a href="mailto:madhura.cj@gmail.com" target="_blank">madhura.cj@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div>On Wed, Sep 24, 2014 at 5:35 PM, Marc Delisle <span dir="ltr"><<a href="mailto:marc@infomarc.info" target="_blank">marc@infomarc.info</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div>
<br>
</div></div>In the current implementation, the mb_* functions are preferred; so we<br>
would use the same priority, to define functions like PMA_substr().</blockquote></div></div></div></div></blockquote></div></div></div></div></div></blockquote><div><br></div><div>Ok. I'll try to do this.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div> </div></div><div>For what it's worth I did some profiling of the import functionality and here is what I observed.</div></div></div></div></blockquote></div></div></div></div></div></blockquote><div><br></div><div>It's worth it! </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>If we consider the substring functionality</div><div><br></div><div>Using the native functions wrapped in OOP function calls,</div><div>php::substr took 0.34 micro secs on average (2.7ms for 8308 calls)</div><div>PMA_StringNative->substr took 13.26 micro secs on average (110ms for 8295 calls)</div><div>PMS_String->substr took 28.93 micro secs on average (244ms for 8294 calls)</div><div><br></div><div>Using the mb functions wrapped in OOP function calls,</div><div>php::mb_substr took 22 micro secs on average (220ms for 9700 calls)</div><div><div>PMA_StringMB->substr took 120.54 micro secs on average (1170ms for 9706 calls)</div><div>PMS_String->substr took 115.50 micro secs on average (958ms for 8294 calls)</div></div><div><br></div></div><div>So it seems like both factors (using mb functions as well as object orientation) are responsible for the slowness. </div></div></div></blockquote></div></div></div></div></div></blockquote><div><br></div><div>Yes, we know than both makes the script slower. OOP can be avoided, but I don't think that we could avoid using mb functions. So this is our minimal constraint.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><br></div><div>See the attached screenshots too.</div></div></div></blockquote></div></div></div></div></div></blockquote><div><br></div><div>I don't know this tool! What is it please? This seems to be very useful, at least for the benchmark I try to do currently.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><div><br></div></div></div><div>I was just wondering what will be the effect if we make current methods as static in those classes?<br></div></div></div></div></blockquote><div><br></div><div>Interesting question. :) I'll include it into my benchmark and give the result.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> <br></div><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span><font color="#888888"><div class="gmail_extra"><br></div>-- <br>Thanks and Regards,<div><br></div><div>Madhura Jayaratne</div></font></span></div></div></blockquote></span></div><span class=""><br>-- <br><div dir="ltr">Regards,<br>Chirayu Chiripal<br><a href="https://chirayuchiripal.wordpress.com/" target="_blank">https://chirayuchiripal.wordpress.com/</a></div></span></div></div></blockquote><div><br></div><div>Thanks for all your feedbacks.</div><div>Hugues. </div></div></div></div>