Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

3.0.4: performance modifications

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
Danez
Smarty Rookie


Joined: 14 Nov 2010
Posts: 5

PostPosted: Sun Nov 14, 2010 6:02 pm    Post subject: 3.0.4: performance modifications Reply with quote

I'm not sure if you guys are watching google-codet-tickets, so i double post it here.

Quote:
I noticed that there are some function calls to is_array() and is_object(), where the variable might be unset/empty.

As can be seen in these tests(http://www.phpbench.com/), the function is_array() is about 6 times slower than isset()/empty().

So i created a patch, that does not alter the logic but checks if variables are empty.



http://code.google.com/p/smarty-php/issues/detail?id=24&can=1
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sun Nov 14, 2010 6:11 pm    Post subject: Reply with quote

Thanks for your input. I will update this for the next release
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP