Comments (3)
I would say there are several different tutorials:
- Running tests/benchmarks (people who will build this from source are likely to be interested in that I think)
the readme mentions that JS outperforms lisp, but doesn't give instructions how to reproduce the benchmark - Writing javascript to execute in emacs-ng/porting existing npm package to be emacs-ng runnable
- JS package management and integrating JS functions to be called by existing elisp
I ran fuzzy-search from here and then I ran fuzzy-search and it was async!
It would be amazing if we can integrate an async backend to a framework like ivy/selectrum or even write a new async backend. I work in a large codebase on a remote machine with slow storage that I have to tramp into and the usually interactive commands are dog slow and block the rest of my emacs to execute. I don't know how applicable it is, but I would be happy to contribute something to solve that (my rust is better than my C or JS though)
from emacs-ng.
I don't know where the best place to document on how to reproduce the benchmark it, though it's pretty simple:
benchmark.el
(js-initialize)
(defun fibonacci(n)
(if (<= n 1)
n
(+ (fibonacci (- n 1)) (fibonacci (- n 2)))))
(let ((time (current-time)))
(fibonacci 40)
(message "%.06f" (float-time (time-since time))))
(let ((time (current-time)))
(eval-js-file "./fib.js")
(message "%.06f" (float-time (time-since time))))
fib.js
const fib = (n) => {
if (n <= 1) {
return n;
}
return fib(n - 1) + fib(n - 2);
};
fib(40);
run with ./src/emacs --batch -l benchmark.el
The latest head of master without nativecomp clocks in with this on my machine:
lisp: 58.584704
JS: 1.203173
time in seconds.
The nativecomp version is just compile with nativecomp, compile that function with nativecomp and invoke it.
from emacs-ng.
I'm going to mark this complete, and will track additional guides under a new issue.
from emacs-ng.
Related Issues (20)
- `browse-url winit display` ? HOT 1
- Blank window with glutin HOT 16
- Browser-based frontend to emacs possible now? HOT 1
- Winit/WR scaling code is broken HOT 1
- Winit/WR doesnt works well on hyprland HOT 9
- Use Webrender GPU rendering with PGTK HOT 11
- Add Webrender support for NS darwin build
- Pure Rust font stack for wr_glyph_rasterizer HOT 12
- Missing window decorations (menu/toolbar etc.)
- WR/PGTK handle dpi/scale factor HOT 4
- `emacs -nw` calls window code
- WR/PGTK childframes are white HOT 4
- Segfault/stack smashing with tao/winit HOT 13
- WR/Winit handle [`ScaleFactorChanged`]
- Keyboard input under high load HOT 7
- Broken nix build HOT 19
- Build error Arch Linux - also the same "workaround". HOT 6
- Building with docker results cargo: command not found error HOT 2
- Nix CI on macOS is broken HOT 1
- emacs fails to load on intel iris with surfman HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emacs-ng.