5P by alstjr7375 2021-03-18 | favorite | 댓글 6개

- Emacs에 Deno 런타임을 결합해 자바스크립트/타입스크립틀 쓸 수 있음
- V8엔진이 Elisp VM보다 최적화가 잘되어 있음
- 이맥스의 부족한 비동기처리, 멀티 쓰레딩을 자바스크립트로 처리 가능(Async/Await, 웹워커), 웹 어셈블리도 지원
- Elisp를 Native Code로 바꿔주는 native-comp와 파이어폭스의 Webrender를 컴포지터로 사용하여 GPU 가속 가능(실험적)

얼마전 해커뉴스에 올라왔었습니다.
https://news.ycombinator.com/item?id=26453174

이맥스는 예전에 스페이스맥스 밖에 안써봐서 잘 모르지만 메인 페이지에서 아래 부분을 읽어 봤는데 흥미롭네요. 결국 Deno를 통해서 성능향상과 언어지원을 확장을 통해서 생태계를 활성화 시키는게 핵심인가보네요

>
Performance#

v8's world-class JIT offers the potential for massive performance gains. For a simple benchmark (fibonacci), using the following implementations:

(defun fibonacci(n)
(if (<= n 1)
n
(+ (fibonacci (- n 1)) (fibonacci (- n 2)))))

const fib = (n) => {
if (n <= 1) {
return n;
}

return fib(n - 1) + fib(n - 2);
};
emacs-ng's JS implementation clocks in over 50 times faster than emacs 28 without native-comp for calculating fib(40). With native-comp at level 3, JS clocks in over 15 times faster. This, along with Async I/O from Deno, WebWorkers, and WebAsm, gives you the tools to make Emacs a smoother and faster experience without having to install additional tools to launch as background processes or worry about shared library versions - full performance with EVERYTHING in the scripting layer.

사실 확장성 자체는 나쁘지 않습니다.
리스프 특유의 매크로
동적 모듈 지원으로 native 언어 바인딩(트리시터 같은 프로젝트가 대표적인예)
libvterm과 Xwidget 지원으로 네이티브한 터미널 에뮬레이터와 브라우저를 내부적으로 사용할 수 있다던지..
https://github.com/canatella/xwwp

문제는 I/O나 쓰레드에요.
I/O가 비동기로 구현이 안되어있어서 커다란 파일은 프리징이 생기며 쓰레드를 만들어도 동시성은 지원하지만 병렬은 아니라 부하가 커지면 문제가 꼭 생기더라고요.😢😢😢

그런데 이 프로젝트는
https://github.com/DavidDeSimone/ng-async-files
처럼 파일의 비동기 처리지원을 하려는 노력이 보이길래 관심이 가는 중입니다.

NPM의 방대한 생태계에도 얹혀갈 수 있고요.

https://emacs-ng.github.io/emacs-ng/main-features/
엄격하게 추가되는 레이어라서 업스트림의 패치를 깔끔하게 적용 가능합니다.

대표적인 예로 제가 어제 이맥스 미러의 native-comp 브랜치를 병합 시도해봤는데요,
1200 커밋이 넘는데 conflict가 4~5개 파일밖에 안생기더군요.
https://github.com/emacs-mirror/emacs/tree/feature/native-comp
https://github.com/emacs-ng/emacs-ng/pull/185

어쩌다보니 팀에 합류하게 됐네요 ㅎㅎ

와 멋지네요. 화이팅 입니다!!