You probably have your opinion on which programming language to use for a larger project, but imagine you have a very small project, and you want it to consume as little memory as possible.
I did comparison of a hello world web service in a few programming languages to get an idea of how much memory each of them consumes from the start.
Raku started consuming 345MiB. Is it expected, or is it something wrong on my test?
I used this dockerfile:
FROM rakudo-star
RUN apt-get update
RUN apt-get install -y libssl-dev
RUN zef install Cro::HTTP --force-test
COPY . /app/
ENTRYPOINT ["perl6", "/app/app.raku"]
Cro is a rather large package intended to run full blown interactive services multi-threaded. So that does not seem out of place.
However, the amount of memory "used", may actually be a lot less in reality. For instance, if a run:
$ raku -e 'say Hello World"; sleep'
on MacOS with an M1, Activity Monitor reports that as using 82.4MB. But if I let the system itself report what its max_rss was for a process, it reports as 140KB. So I'm not sure if the MB number indicate actual memory usage, or just potential usage.