|
Re: Please try out FFI speed improvement: msg#00044lisp.clisp.general
Aurelio Bignoli wrote: >with-c-var/cast > Real time: 1.273894 sec. (it was 1.494392) >with-foreign-object/%cast > Real time: 0.521461 sec. (it was 0.638666) This is strange, since the compiler macro using LOAD-TIME-VALUE is supposed to do exactly what I did by hand using %CAST directly. Therefore, one should not see any difference in speed (or slowness). Likewise, WITH-C-VAR is just a compile-time macro (symbol-macrolet) atop with-foreign-object, and the macro usage should be compiled away. Therefore, it should not make a difference at run-time. >my FFI code for Berkeley DB works fine with this new definition. Sure, but knowing how it works one can easily defeat it (e.g. using non-top-level DEF-C-TYPE and DEFUN in same scope). Therefore, it cannot IMHO become part of standard CLISP. What's in foreign1.lisp must work in all cases for all FFI users, not only in simple situations. In other words The LOAD-TIME-VALUE optimization is not conservative enough. I welcome suggestions. Another approach may be to recursively traverse the c-type definiton at compile-time, computing whether the declaration is a simple one or not. If yes, inline it. That's the other side: a too conservative algorithm/optimization. Regards, Jorg Hohle. ------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Using filenames which contain wildcard characters: 00044, Mark Triggs |
|---|---|
| Next by Date: | (±¤°í)¾Æ´Ï! ÀÌ ¹«½¼ ³¿»õ......???@: 00044, ½Å¿ë ö |
| Previous by Thread: | Using filenames which contain wildcard charactersi: 00044, Mark Triggs |
| Next by Thread: | Re: Please try out FFI speed improvement: 00044, Aurelio Bignoli |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |