From: Cecil Westerhof <Cecil@decebal.nl>
To: guile-user@gnu.org
Subject: Re: Performance
Date: Sat, 19 Jun 2010 17:05:50 +0200 [thread overview]
Message-ID: <87r5k3qcz5.fsf@linux-lqcw.site> (raw)
In-Reply-To: <m31vc3e61q.fsf@pobox.com> (Andy Wingo's message of "Sat, 19 Jun 2010 11:16:17 +0200")
Op zaterdag 19 jun 2010 11:16 CEST schreef Andy Wingo:
> On Fri 18 Jun 2010 22:50, Cecil Westerhof <Cecil@decebal.nl> writes:
>
>> Why is this so expensive?
>
> The general answer to this question can be found by profiling. You
> should factor your code into a function, then from the repl:
>
> ,profile (call-my-function)
>
> I wonder, perhaps we should have a --profile command-line flag...
When calling my script with:
dummy.scm "temp/input" "dummy.log" "^ +" "1234567890"
it is just executed.
When starting Guile, I give:
(load "bin/dummy.scm")
and then:
(main "temp/input" "dummy.log" "^ +" "1234567890")
and I get:
Backtrace:
In standard input:
10: 0* [main "temp/input" "dummy.log" "^ +" "1234567890"]
standard input:10:1: In procedure main in expression (main "temp/input" "dummy.log" ...):
standard input:10:1: Wrong number of arguments to #<procedure main (args)>
ABORT: (wrong-number-of-args)
when I use:
(main ("temp/input" "dummy.log" "^ +" "1234567890"))
I get:
Backtrace:
In standard input:
11: 0* [main ...
11: 1* ["temp/input" "dummy.log" "^ +" "1234567890"]
standard input:11:7: In expression ("temp/input" "dummy.log" "^ +" ...):
standard input:11:7: Wrong type to apply: "temp/input"
ABORT: (misc-error)
So how should I call it from the REPL?
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
next prev parent reply other threads:[~2010-06-19 15:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-18 20:50 Performance Cecil Westerhof
2010-06-19 9:16 ` Performance Andy Wingo
2010-06-19 15:05 ` Cecil Westerhof [this message]
2010-06-19 15:44 ` Performance Thien-Thi Nguyen
2010-06-21 9:41 ` Performance Cecil Westerhof
2010-06-19 18:16 ` Performance Andy Wingo
2010-06-21 9:48 ` Performance Cecil Westerhof
2010-06-21 19:34 ` Performance Andy Wingo
2010-06-21 20:34 ` Performance Decebal
2010-06-22 11:33 ` Binary packages of Guile development snapshots? (was Re: Performance) Štěpán Němec
2010-06-22 19:04 ` Binary packages of Guile development snapshots? Andy Wingo
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r5k3qcz5.fsf@linux-lqcw.site \
--to=cecil@decebal.nl \
--cc=guile-user@gnu.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).