| mgr | nikodemus: you suggest to completely get rid of the wihtout-gcing? |
| nikodemus | "make-local-alien is part of sb-alien-internals" <-- as in not part of the interface |
| mgr | jsnell: Why worse? I would guess that it'll not make it better. but actually worse? |
| nikodemus | mgr: without looking at the code it is a bit hard to say, but it does sound like it |
| Xof | nikodemus: aren't you meant to use with-alien? |
| mgr | nikodemus: but it's only called by code generated by WITH-ALIEN. It's not that matlisp directly uses make-local-alien. |
| nikodemus | mgr: ah, ok |
| jsnell | mgr: because it means that you'll be dropping samples if the code block inside the without-gcing takes longer than .001 seconds to execute, rather than 0.01 seconds |
| nikodemus | Xof: yes |
| jsnell | so you might think that such a code block is only taking x% of your total execution, but it's actually taking 10*x% |
| mgr | jsnell: in case of .01 seconds there are absolutely less samples, as I've set :loop to nil. |
| jsnell | I'm not particularily telling you to use a higher value. I'm just saying that if you're using without-gcing, your results might be very inaccurate but if you think that this doesn't apply to you, feel free to ignore me |
| mgr | nikodemus: probably some more context information helps, the docstring describes what the macro containing without-gcing does: ""WITH-VECTOR-DATA-ADDRESSES (var-list &body body) Execute the body with the variables in VAR-LIST appropriately bound. VAR-LIST should be a list of pairs. The first element is the address of the desired object; the second element is the variable whose address we want. Garbage collection is also disabled while executing the body." |
| Xof | you're not listening sampling with a higher frequency will lead to a more misleading result in the region covered by without-gcing |
| mgr | jsnell: I really do not want to ignore. I'm sorry if that sounds like it. I try to understand it; probably I get something wrong. |
| jsnell | disable interrupts; sample; sample; enable interrupts only one of those samples will be delivered |
| mgr | ah, okay the samples during without-gcing are really just dropped? (As you've said before..) sorry |
| jsnell | no! only one of them will be delivered |
| mgr | jsnell: sorry, I've written it before having read your latest lines. (probably lag) jsnell: uhm, sorry for the direct question, but *why* is it that only one of them is delivered? |
| nikodemus | mgr: sorry, but i don't have time right now to dig into this. but if the without-gcing is wrapped around the body of a macro, then all the call-sites using it need to be audited, since any one of them may be depending on that |
| mgr | nikodemus: Okay, thank you for your time. |
| nikodemus | but i also re-iterate that neither WITH-ALIEN or MAKE-ALIEN allocated objects are moved by the gc |
| mgr | nikodemus: okay. |
| Xof | mgr: basically, because we mustn't act on any interrupts while interrupts are disabled, so we have to queue them, and we only have space for one interrupt in the queue |
| mgr | I think that it's total (runtime) overhead for my application to use matlisp at all. I'll probably just implement the tiny bit that I need in lisp and drop using matlisp. My program has only very small matrices. But I wanted to start fast and just use an existing library. I think most of the time is not spend in actual computation but in copying and allocating objects. but before implementing a replacement I wanted to analyse the existing version a bit. Xof: Okay. |
| jsnell | nikodemus: would you be surprised if without-gcing was suffering from the same kind of race that without-spinlock-and-without-gcing? |
| mgr | jsnell, nikodemus, Xof: thank you all for your patience. I'm a bit sorry to have occupied time of all of you. jsnell: perhaps it would be a good idea to mention how sb-prof works in SBCL's manual. |
| jsnell | could be |
| Xof | clim pane-viewport-region |
| specbot | http://bauhh.dyndns.org:8000/clim-spec/29-3.html#_1641 |
| mgr | I was a bit surprised that the sampling-interval was 0.01 seconds which seemed to be quite a long time for me. But that's probably the reason why the default of max-sampling seems to be quite high (for me). (I hope I don't get this wrong as well.) |
| jsnell | not really. 0.01 seems like a reasonably frequent value; it means that with a program that runs for 10 seconds, you get 1000 samples. and that is usually enough to paint a pretty accurate picture of what's happening |
| Xof | meh |