Thanks for your suggestion, but I found some time ago that using DateTime for parsing and manipulating timestamps is not very fast. My tests shown that it is tens times slower than combination of split() and POSIX::mktime.
I'm writing my things multithreaded to gain some speed by using several cores of CPU, so returning to DateTime would be serious step back from the performance point of view.
| [reply] |
I'm writing my things multithreaded to gain some speed by using several cores of CPU,....i don't see exactly what your problem is with the timestamp....it prints out....what do you expect it to do? ...as far as using Perl threads to gain a performance benefit, you may be barking up the wrong tree...... Perl threads are not as solid as c pthreads, and you may actually find that threading slows you down.... if you search the nodes here, or google it, you will find that Perl threads don't give you speed thru concurrency..... in Perl the main thread gets a priority, and the time slice gets divided amoung the it's threads..... no concurrency..... just a thought before you start banging your head on the wall over thread speed ... :-) ...additionally, i don't think Perl has any capability to tell the system to utilize different cpu's,
for each thread, that's the kernel's job
| [reply] |
in Perl the main thread gets a priority, and the time slice gets divided amoung the it's threads..... no concurrency..
Sorry Zentara, but that is absolute and utter baloney.
Be it pthreads under *nix, or native threads under Win, both are native kernel threads! As such, the will each receive their own timeslices from the kernel; and on multi-cored & multi-cpu'd machines, are eligiable to run on all cores.
I really did think you knew better?
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
You've already shown that POSIX isn't thread safe in that respect. I don't know what you're expecting from us if you're dismissing the alternatives.
| [reply] |
setenv("TZ","Blah-Blah",1);
tzset();
from .xs does the trick.
But doing
$ENV{TZ}='blah-blah'
POSIX::tzset()
does not. | [reply] [d/l] [select] |