Re: Random Unique ID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2007. 03. 23, péntek keltezéssel 15.13-kor tedd ezt írta:
> At 9:15 AM +0100 3/23/07, Németh Zoltán wrote:
> >2007. 03. 22, csütörtök keltezéssel 12.58-kor tedd ezt írta:
> >>  At 4:53 PM +0100 3/22/07, Németh Zoltán wrote:
> >>  >2007. 03. 22, csütörtök keltezéssel 11.42-kor tedd ezt írta:
> >>  >
> >>  >  > As for efficiency, that's probably not 
> >>even worth mentioning in this case.
> >>  >
> >>  >why not? you would use 2 sql queries while I would use one most of the
> >>  >time and 2 in case of already reserved ID - that is almost twice as much
> >>  >processor time
> >>  >that may count much if the routine is used frequently
> >>
> >>  Go ahead, try it, and tell me how much time it cost.
> >>
> >>  From experience, there are things one can spend
> >>  their time optimizing and there are other things
> >>  that one should be able to see that aren't worth
> >>  pursing.
> >>
> >>  I've been wrong before, but you're open to 
> >>prove me wrong again, if you like.
> >
> >okay, I've got up earlier and made a little benchmark. The result
> >suprised me, and proved you right. ;)
> 
> Németh:
> 
> Thanks for trying, but I said what I did because 
> I knew from experience that these types of 
> actions are blinding fast and getting faster all 
> the time.
> 
> I'm not suggesting to dispense with looking for 
> less operations, but sometimes the effort doesn't 
> exceed other benefits in readability, easier 
> logic, simpler code, and time spent developing 
> code. We have been rather slow to realize changes 
> the speed and memory of hardware.
> 
> For example, we recently had a discussion on the 
> difference between using "<?" as compared to 
> "<?php" and the additional text was mentioned as 
> a "concern". When in fact, if is of no noticeable 
> or significant concern at all. It's like 
> discussing a grain of sand on the beach.
> 
> Not that you did this, but sometimes it's best to 
> figure out what's important and what's not before 
> making it an issue.

yeah, you're right again :)
(however my first name is still Zoltán instead of Németh ;) )

that's what I did now. I figured out it's not important. thanks for
inspiring me to do that :)

greets
Zoltán Németh

> 
> Cheers,
> 
> tedd
> 
> -- 
> -------
> http://sperling.com  http://ancientstones.com  http://earthstones.com
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux