Hello again, When reviving my old ecl-unix code, I wanted to isolate the various FFI hacks I put in it to another file and actually ended mostly reimplementing them. This also made me look at the C and assembly results when for instance looking at what C structure accessors looked like.
I noticed many calls to ecl_to_pointer() expanding to ecl_foreign_data_pointer_safe() calls even with (optimize (safety 0)). But interestingly in cmp/sysfun.lsp, I saw the following line: (def-inline si:foreign-data-p :always (t) :bool "@0;ECL_FOREIGN_DATA_P(#0)") Was this an attempt to inline such cases? Although there seems to be a difference between data and pointer? I also noticed that my DECLAIM to inline the accessor functions do not appear to work, so there also always are function calls made to access/set structure fields no matter the SPEED/SAFETY level. This is not terrible, although if such small functions could be inlined it'd be nice. Since the inline declamations appeared to work in other contexts for small functions, I wondered if perhaps it's a limitation of functions using C-INLINE. I also thought about perhaps generating small C functions with the inline directive via CLINES instead of using C-INLINE too, which could be another approach (I'd also have to check how to get those to register CL symbols and be ECL friendly then). (the aforementioned code is http://cvs.pulsar-zone.net/cgi-bin/cvsweb.cgi/~checkout~/mmondor/mmsoftware/cl/test/mmffi.lisp) Thanks, -- Matt ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list