[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Performance
From: |
Cecil Westerhof |
Subject: |
Re: Performance |
Date: |
Sat, 19 Jun 2010 17:05:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Op zaterdag 19 jun 2010 11:16 CEST schreef Andy Wingo:
> On Fri 18 Jun 2010 22:50, Cecil Westerhof <address@hidden> 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
- Performance, Cecil Westerhof, 2010/06/18
- Re: Performance, Andy Wingo, 2010/06/19
- Re: Performance,
Cecil Westerhof <=
- Re: Performance, Andy Wingo, 2010/06/19
- Re: Performance, Cecil Westerhof, 2010/06/21
- Re: Performance, Andy Wingo, 2010/06/21
- Re: Performance, Decebal, 2010/06/21
- Binary packages of Guile development snapshots? (was Re: Performance), Štěpán Němec, 2010/06/22
- Re: Binary packages of Guile development snapshots?, Andy Wingo, 2010/06/22