HN🔥 82
💬 24

C言語を爆速化する魔法?「CJIT」が登場!

smartmic
約11時間前

ディスカッション (10件)

0
smartmicOP👍 82
約11時間前

C言語にJIT(Just-In-Time)コンパイルを導入する試み「CJIT」について。実行時に最適化を行うことで、さらなるパフォーマンス向上を目指す野心的なプロジェクトです。

1
michaelcampbell
約10時間前

Looks interesting and fun, but in no instance of any C compiler I've come across is the "classic example" of "hello, world" using fprintf(stderr, ...)

To each their own I guess.

3
gosukiwi
約9時間前

Did you use Codex 5.4 for the web design? :p I think Codex tends to do very similar designs, could be completely mistaken tho

5
theogravity
約9時間前

The site visually feels "compressed" due to the font used? It's a bit jarring. The tutorial link in the header nav doesn't go anywhere.

6
apitman
約8時間前

Cool idea.

I was wondering why the release explicitly is cjit-x86_64-ubuntu-24.04 instead of generic linux, but it does in fact appear to not work on Arch:

tcc: error: file '/lib/x86_64-linux-gnu/libgcc_s.so.1' not found

I'm guessing that's due to a dlopen since it's not listed by ldd

The TUI demos work great, but I couldn't get the SDL examples to resolve all the missing symbols after trying for a bit.

8
jsLavaGoat
約8時間前

Inspired by Terry. But does it glow?

9
tnelsond4
約5時間前

What's different between tcc -run and CJIT?
The main difference is in usability.

CJIT improves three main UX aspects for now:

It works as a single executable file which embeds the TinyCC compiler, all its headers and its standard library. This way there is no need to install anything system wide, check paths and setup build folders.

It supports adding multiple files into one execution: can accept wildcards to ingest anything that is a C source, a pre-compiled object or a shared library. The symbols exported by each file will be visible to all during the same execution.

It finds automatically common system libraries for each target platform, avoiding the need to repeat these settings and look for the right paths.