Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Dates and Times
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Edward S. Peschko  
View profile  
 More options Mar 9 2004, 8:48 pm
Newsgroups: perl.perl6.internals
From: e...@pge.com (Edward S. Peschko)
Date: Tue, 9 Mar 2004 17:25:34 -0800
Local: Tues, Mar 9 2004 8:25 pm
Subject: Re: Dates and Times

> I don't think optimising for "X" is the reason. Parrot should have
> concise, necessary, complete opcode primitives upon which anything
> else can be built.

how about opcode formatting primitives? That is what I would argue
strftime and relatives are... generic low-level ways of turning strings
into dates into numbers (seconds) and vice-versa.

That they are part of a standard low-level library (libc) that is widely
available and can be described in terms of parrot primitives (strings, numbers),
and the fact that this low-level library is well known, tested and
supported on various platforms just seems to me to be a tremendous timesaver.

> Date parsing can be done all "with" opcodes, but please not "inside"
> opcodes.
> If we cannot provide a decently performing VM that makes people want to
> write stuff in bytecode (or compiled to bytecode) we have failed anyway.

I agree that facilitating easy bytecode writing is really important - but
reimplementing a pretty standard wheel and having that pretty standard wheel
be slower than what is available doesn't seem to be useful to me. Taking
the standard wheel and augmenting it seems more useful IMO.

> This is subjective reasoning, though. If we want to talk performance
> hits, we should know where we stand. When bytecode isn't full of
> PMC thrashing, and actually uses the low level Ix and Sx registers
> where possible, the JIT works extremely well and the performance
> beats Perl5 by several orders of magnitude in many cases. Hopefully
> the "hints" in Perl6 will help us write better libraries, but some of it
> may have to be written in IMC or slightly higher level language (on
> the equivalent of C, compilable to bytecode).

I tell you what - why don't base your decision on an empirical test.
I'll write a c program around strftime that does a given
set of formatting dates and times, as well as the reverse translation, and
we can benchmark that program versus the bytecode that parrot offers in a stdlib on
a list of tasks.

After some optimising iterations, we'll compare the results. And depending
on the performance difference, you can decide whether or not its worth the effort
to put these primitives in the core.

> >> This sort of creeping featuritis is why date formatting and especially
> >> parsing do NOT belong as opcodes. It's too big a problem to solve in the

> I agree.

And the more I think about it, the more I think this concern is misplaced.
Putting it in an opcode will make it *harder* to do this type of thing, not easier.
In perl5 land, backwards - and forwards - compatibility is a big concern. There will
be a large tendency to stabilize any implementation that occurs here.

Ed


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.