Thanks for suggestions and insightful explanation!
I've tried `GC_fullcollect()`:
main()
var tmp = a
a = tmp
tmp = @[]
GC_fullCollect()
os.sleep(1)
Run
Memory usage comes down to 1,8 GiB. It's still high, but at least it looks like
GC have
Sorry to contradict you but a) the memory is the same for all, and b) lots of
mem can only somewhat minimize java's disadvantage.
Nim and other complied servers should still be noticeably faster. And there are
other interpreted frameworks/servers too that are faster than Nim. To be frank,
Yeah, that's probably the best way. I was putting it off because it sounded
complicated but I guess it's probably the best way. Thanks :)
one way to accomplish this(which also simplifies a lot of your scaling code and
is probably the "standard" way of doing it) is by rendering everything [to a
texture](https://wiki.libsdl.org/SDL_SetRenderTarget?highlight=%28%5CbCategoryRender%5Cb%29%7C%28CategoryEnum%29%7C%28CategoryStruct%29)
I tried that, but I don't know how to scale the pixels, so they look out of
place. Is there any way to change the pixel size of the draw functions so they
aren't always one pixel?
you can probably can replace all these bresenham line and circle functions,
which set one pixel at a time, since SDL2 has a function for all these things.
They're probably faster too.
[https://wiki.libsdl.org/CategoryRender](https://wiki.libsdl.org/CategoryRender)
Fixed it, thanks!
I changed it to allow for more flexibility when using a custom font. Now there
is a string, "glyphs", which stores the chars in the font in order, and the
function now checks it to return a number.
Also, thanks for reminding me of ranges, I completely forgot about them
I don't know much about Nim's Garbage-Collector, but for me behaviour looks not
surprising.
First, it is generally recommended to put all the code inside of a proc, often
called main(). That can improve performance, but I think that would make no
difference for GC here.
Second, calling pop()
> I am not experienced enough to see where I could make improvements.
I've just skimmed through your repo and the first place where I would start
with the improvements is that [loong case
statement](https://github.com/NIMNIMNIMNIM/NIM16/blob/master/src/engine.nim#L121).
You