|
From: Nicolas N. <Nic...@iw...> - 2003-11-24 18:12:05
|
Raymond Toy <to...@rt...> writes: > It's not multithreading, per se. It's because we can't have GC > suddenly move the vectors before doing the foreign call, otherwise the > foreign function will be reading and writing to some random place in > memory. OK. But if GC is done by the same thread, my simple mind would think that switching it off means setting one global variable to NIL. > A factor of 2 will be very difficult to achieve, since a Lisp function > call basically loads up a bunch of pointers and calls the function. We > need to compute addresses, do the without-gc/unwind-protect stuff, load > up the registers for a foreign call and then call it. Yes. Here I assume (in the direction to what Duane posted) that also the Lisp compiler works with addresses and has them readily available. > Nicolas> and choosing Matlisp data for the blocks would be a possibility. But the > Nicolas> blocks can be small, therefore I cannot make compromises when operating on > Nicolas> those blocks. > > I assume you've profiled it so that the small blocks really are the > bottleneck? I'm still more or less in the design phase. I have now a compact row-ordered scheme (which is as fast as the C version) and want to make it more general without destroying too much performance. It is a very safe bet that I cannot bear too much of overhead here. Could be that I will have to handle the very small blocks (1x1--3x3) even without any function call. Nicolas. |