From: tab@snarc.org (Vincent Hanquez)
To: Oliver Bandel <oliver@first.in-berlin.de>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Now it's faster (addendum to "Performance-question")
Date: Mon, 11 Feb 2008 13:36:34 +0100 [thread overview]
Message-ID: <20080211123633.GA10096@snarc.org> (raw)
In-Reply-To: <1202552291.47ad7de31aa31@webmail.in-berlin.de>
On Sat, Feb 09, 2008 at 11:18:11AM +0100, Oliver Bandel wrote:
> Possibly, but I have no reason to start such an implementation,
> if the current possibilities are fast enough.
> IMHO optimization comes at the end. When things are working
> well and fast enough, optimization is wasted time.
> If the software needs optimization, it can be done then.
i though that's what you were doing ;)
> This is from a practical perspective.
> The academic perspective might be different.
i was talking on pratical perspective. i don't care about academic
research. i seen pratical problem with the 16mb limit, and also breaking
the 16mb limit means you have a faster implementation. i'ld though i
mentions it, but obviously the buffer is good enough on some usage.
> > the buffer library is actually pretty bad since it's actually just a
> > simple string.
>
> IMHO it's differently, but I didn't looked at the code.
well i've looked at the code, and it's a string ;)
> > each time the buffer need to grow, the string is
> > reallocated and the previous one is copied to the new string.
>
> Are you talking about Buffer-module or the "^"-operator?
Buffer module.
> I only do use that string to write it to a dbm-database.
> I need a certain layout of the strings, because more
> than one data-item must be stored for each key.
> It's not a complicated format, but the strings must be concated.
> I did this with "^" first, because I didn't expected
> that the string-stuff needs that much time. I thought my
> mathematical operations (statistical things) need most time,
> but my expectation was wrong. The calculations were done very fast.
> So using Bufeer-module instead of "^" for the concat's
> did bring a good performance boost.
I wasn't saying the contrary; string concatenation is really really bad
for appending obviously, since 1 string is reallocated and 2 are blitted
into this new string. obviously the buffer is much faster, because the
re-allocation doesn't happens everytimes. But the reallocation can be
avoided in another implementation, making thing even faster, depend on the
usage you have with your data.
> P.S.:
>
> ===============================================
> # Sys.max_string_length;;
> - : int = 144115188075855863
> #
> ===============================================
you're running a 64bit version, so obviously you don't have the 16mb
limit.
--
Vincent Hanquez
next prev parent reply other threads:[~2008-02-11 12:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-06 11:33 Oliver Bandel
2008-02-06 11:55 ` [Caml-list] " Oliver Bandel
2008-02-06 12:04 ` Vincent Hanquez
2008-02-07 9:55 ` David Teller
2008-02-09 10:03 ` Oliver Bandel
2008-02-09 10:29 ` David Teller
2008-02-09 10:18 ` Oliver Bandel
2008-02-11 12:36 ` Vincent Hanquez [this message]
2008-02-11 10:01 ` Jean-Christophe Filliâtre
2008-02-11 12:41 ` Vincent Hanquez
2008-02-11 14:34 ` Jean-Christophe Filliâtre
2008-02-11 14:51 ` Vincent Hanquez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080211123633.GA10096@snarc.org \
--to=tab@snarc.org \
--cc=caml-list@inria.fr \
--cc=oliver@first.in-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox