On Sat, Jan 18, 2014 at 04:29:10PM +0100, Silvan Jegen wrote:
> Find the code (including a few more escapes) and the manpage below. The
> manpage is very terse at the moment so if you think we should flesh the
> text out more, or change the formatting, I am open for suggestions. Also,
> I am not a
On Wed, Jan 15, 2014 at 07:53:25PM +, Dimitris Papastamos wrote:
> On Wed, Jan 15, 2014 at 08:43:54PM +0100, Silvan Jegen wrote:
> > I will start writing a man page (possibly based on the GNU one) as soon
> > as I find the time (hopefully in the next few days).
>
> Consider looking at the Open
On Thu, Jan 16, 2014 at 10:46:41AM +, sin wrote:
> On Thu, Jan 16, 2014 at 11:37:46AM +0100, Silvan Jegen wrote:
> > On Thu, Jan 16, 2014 at 10:16 AM, Roberto E. Vargas Caballero
> > wrote:
> > >> I would still go for the function-pointer-less version of the
> > >> code since it actually is on
On Thu, 16 Jan 2014 11:37:46 +0100
Silvan Jegen wrote:
> Does anyone else have any strong feelings one way or the other?
I prefer the version _with_ the function-pointer, too.
Linking against musl shows that the biggest impact still resides in the
standard library-code itself.
--
FRIGN
On Thu, Jan 16, 2014 at 11:37:46AM +0100, Silvan Jegen wrote:
> On Thu, Jan 16, 2014 at 10:16 AM, Roberto E. Vargas Caballero
> wrote:
> >> I would still go for the function-pointer-less version of the
> >> code since it actually is one line shorter, I think. The second,
> >> function-pointer-less
On Thu, Jan 16, 2014 at 10:16 AM, Roberto E. Vargas Caballero
wrote:
>> I would still go for the function-pointer-less version of the
>> code since it actually is one line shorter, I think. The second,
>> function-pointer-less version of the code can be found below.
>
> I like more the version wit
On Thu, Jan 16, 2014 at 1:41 AM, Szabolcs Nagy wrote:
> * Silvan Jegen [2014-01-15 22:32:28 +0100]:
>> On Wed, Jan 15, 2014 at 09:36:07PM +0100, Szabolcs Nagy wrote:
>> > > +handleescapes(char *s)
>> > > +{
>> > > + switch(*s) {
>> > > + case 'n':
>> > > + *s = '\x0A';
>> > > + br
> By no means was this any serious benchmarking but eliminating the function
> pointer did not seem to make an obvious difference.
Good job
> I would still go for the function-pointer-less version of the
> code since it actually is one line shorter, I think. The second,
> function-pointer-les
* Silvan Jegen [2014-01-15 22:32:28 +0100]:
> On Wed, Jan 15, 2014 at 09:36:07PM +0100, Szabolcs Nagy wrote:
> > > +handleescapes(char *s)
> > > +{
> > > + switch(*s) {
> > > + case 'n':
> > > + *s = '\x0A';
> > > + break;
> > > + case 't':
> > > + *s = '\x09';
> > > +
On Wed, Jan 15, 2014 at 09:36:07PM +0100, Szabolcs Nagy wrote:
> * Silvan Jegen [2014-01-15 20:43:54 +0100]:
> > Note, though, that GNU's tr does not seem to handle Unicode at all[1]
> > while this version of tr, according to "perf record/report", seems to
> > spend most of its running time in the
* Silvan Jegen [2014-01-15 20:43:54 +0100]:
> Note, though, that GNU's tr does not seem to handle Unicode at all[1]
> while this version of tr, according to "perf record/report", seems to
> spend most of its running time in the Unicode handling functions of glibc.
multi-byte string decoding is kn
On Wed, Jan 15, 2014 at 08:43:54PM +0100, Silvan Jegen wrote:
> I will start writing a man page (possibly based on the GNU one) as soon
> as I find the time (hopefully in the next few days).
Consider looking at the OpenBSD manpage for tr.
I will apply this as soon as you send in a manpage for it.
On Wed, Jan 15, 2014 at 11:27:23AM +, sin wrote:
> On Tue, Jan 14, 2014 at 09:35:11AM +0100, Silvan Jegen wrote:
> > On Tue, Jan 14, 2014 at 12:22 AM, wrote:
> > > On Mon, Jan 13, 2014 at 11:19:49AM -0800, Silvan Jegen wrote:
> > >> I have rewritten "tr" to use mmap and the wchar.h functions.
On Tue, Jan 14, 2014 at 09:35:11AM +0100, Silvan Jegen wrote:
> On Tue, Jan 14, 2014 at 12:22 AM, wrote:
> > On Mon, Jan 13, 2014 at 11:19:49AM -0800, Silvan Jegen wrote:
> >> I have rewritten "tr" to use mmap and the wchar.h functions. It seems
> >> to be quite slow but as far as I can tell it w
On Mon, Jan 13, 2014 at 11:19:49AM -0800, Silvan Jegen wrote:
> I have rewritten "tr" to use mmap and the wchar.h functions. It seems
> to be quite slow but as far as I can tell it works reasonably well (at
> least when using a UTF-8 locale). Comments/review and testing welcome
> (I am relatively n
On Tue, Jan 14, 2014 at 12:22 AM, wrote:
> On Mon, Jan 13, 2014 at 11:19:49AM -0800, Silvan Jegen wrote:
>> I have rewritten "tr" to use mmap and the wchar.h functions. It seems
>> to be quite slow but as far as I can tell it works reasonably well (at
>> least when using a UTF-8 locale). Comments
On Mon, Jan 13, 2014 at 11:19:49AM -0800, Silvan Jegen wrote:
> I have rewritten "tr" to use mmap and the wchar.h functions. It seems
> to be quite slow but as far as I can tell it works reasonably well (at
> least when using a UTF-8 locale). Comments/review and testing welcome
> (I am relatively n
Hi
I have rewritten "tr" to use mmap and the wchar.h functions. It seems
to be quite slow but as far as I can tell it works reasonably well (at
least when using a UTF-8 locale). Comments/review and testing welcome
(I am relatively new to C so beware)!
If you think adding this version of "tr" to s
18 matches
Mail list logo