u/madmuppet006

why do my threads suck?

I have written a program to draw the buddhabrot ..

I was here the other day asking about how to increase heap size and was offered a lot of help so thanks for that ..

I have run my single threaded program and gotten good results on a small number of pixels and sample points ..

I rewrote the program to use sb-threads .. only due to Google making it extremely difficult to find information that I can use ..

example using do loops to start threads because I don't really understand the loop procedure .. and using named functions instead of anonymous ones ..

I got the run around .. bt or lparallel .. I went with sb-threads because I at least understand the concept .. I don't know how to write a procedure for lparallel

so I finally have a multi threaded program that uses 16 threads on my 5950 x 16 core processor ..

I'm running it now and it's using 59% of one core and 40 something percent of another ..

the question is .. how do I ensure I am using the processor to the best extent?

what are potential pitfalls I could have fallen into with my code?

thanks for reading appreciated ..

amateur al.

reddit.com
u/madmuppet006 — 9 days ago

increase heap size sbcl

I am trying to draw a large buddhabrot for my daughter's birthday ..

I can draw a small one but when I increase the pixel count I get heap exhausted (no more space for allocation)

992739328 bytes available 2485248016 requested

I am using emacs slime and sbcl 2.30 on a Debian box with 128gb of ram ..

I have tried using (setq slime-lisp-implementations '((sbcl ( "sbcl" "dynamic-heap-size" "4096")))) and other numbers in there and still get the same error

I have tried setting the dynamic heap size in the console but I find it's a nightmare and doesn't work

how can I permanently increase the heap size for sbcl?

thanks

al

reddit.com
u/madmuppet006 — 13 days ago