3 ms·
Cool project. Unlike tcc and cproc though kefir doesn't seem very good at handling big arrays. This $ kefir -c - <<x int a[] = { $(seq 10000000 | t
by oguz-ismail 1y ago
Cool project. Unlike tcc and cproc though kefir doesn't seem very good at handling big arrays. This
$ kefir -c - <<x
int a[] = {
$(seq 10000000 | tr '\n' ,)
};
x
allocates gigabytes of memory and eventually crashes WSL on my machine.
- _g6sn 1y agoI have addressed compiler inefficiency in the sibling comment. This is indeed a problem. Empty arrays of such size should be compile-able (there is sparse representation for arrays). However, I would say that this use case is not particularly practical, at least in none of the projects from my test suite this has been an issue.
- oguz-ismail 1y agoGood work either way. Congrats!