Welcome Guest, Not a member yet? Register   Sign In
How CodeIgniter Works?
#16

[eluser]BrianDHall[/eluser]
[quote author="jedd" date="1252469272"][quote author="BrianDHall" date="1252450941"]
You don't intentionally do things that are painfully dumb, but for instance trying to use arrays instead of objects because arrays are faster ...yuck, terrible! Yet so many people suggest things of this sort, it's painful.
[/quote]

This needs a bit of an explanatory comment, I think.[/quote]

Oh, this makes me recall when you mentioned you prefer arrays, sorry. No, I don't mean that using arrays are bad because you prefer them - but I mean specifically going out of your way to load things into an array hoping to gain a speed boost when using an existing object and it's methods would have worked just fine.

I can't recall the exact suggestions over the years (because I deleted as many as I could from my mind), but I've seen suggestions to avoid perfectly valid syntax and functions because it would "improve performance"...on the order of a few milliseconds per thousand loads. Things like trying to avoid use of foreach because using list was 'faster', or not using associative arrays because using single-dimension indexed arrays took less cpu cycles, or using ternary and bitwise operations that were incredibly hard to read because the function would be better now somehow because your server could now serve 10 more requests per minute...that sort of thing.

In short, you should develop quickly according to your preferences, maintenance, readability of code, etc - not trying to develop with the mind of "what will take less cpu cycles?"

I meant no offense on preferring arrays to objects - I still do too, actually. But I would take issue if you suggested using arrays for no reason other than speed of computation, directly in the face of a solution that took less lines of code, was more readable, or that used existing functions preferring to build loops manually to save a few clock cycles.


Messages In This Thread
How CodeIgniter Works? - by El Forum - 09-04-2009, 09:17 AM
How CodeIgniter Works? - by El Forum - 09-04-2009, 09:30 AM
How CodeIgniter Works? - by El Forum - 09-04-2009, 09:40 AM
How CodeIgniter Works? - by El Forum - 09-04-2009, 09:42 AM
How CodeIgniter Works? - by El Forum - 09-04-2009, 09:48 AM
How CodeIgniter Works? - by El Forum - 09-04-2009, 01:03 PM
How CodeIgniter Works? - by El Forum - 09-04-2009, 07:55 PM
How CodeIgniter Works? - by El Forum - 09-04-2009, 08:13 PM
How CodeIgniter Works? - by El Forum - 09-04-2009, 08:38 PM
How CodeIgniter Works? - by El Forum - 09-05-2009, 05:20 AM
How CodeIgniter Works? - by El Forum - 09-05-2009, 05:27 AM
How CodeIgniter Works? - by El Forum - 09-07-2009, 10:55 PM
How CodeIgniter Works? - by El Forum - 09-08-2009, 02:12 AM
How CodeIgniter Works? - by El Forum - 09-08-2009, 12:02 PM
How CodeIgniter Works? - by El Forum - 09-08-2009, 05:07 PM
How CodeIgniter Works? - by El Forum - 09-08-2009, 05:23 PM
How CodeIgniter Works? - by El Forum - 12-31-2009, 08:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB