Size: a a a

2020 February 16

λ

λоλторт in rust_offtopic
источник

P

Pavel in rust_offtopic
особенно, если ты хочешь увеличить сложность и объёмность уже сложной и объёмной работы
источник

а

а это кто in rust_offtopic
Piu Piu
Re: ESbuild – A fast JavaScript bundler and minifier i...
       
Author here. I think the Rust vs. Go question is interesting. I actually originally wrote esbuild in Rust and Go, and Go was the clear winner.

The parser written in Go was both faster to compile and faster to execute than the parser in Rust. The Go version compiled something like 100x faster than Rust and ran at something around 10% faster (I forget the exact numbers, sorry). Based on a profile, it looked like the Go version was faster because GC happened on another thread while Rust had to run destructors on the same thread.

The Rust version also had other problems. Many places in my code had switch statements that branched over all AST nodes and in Rust that compiles to code which uses stack space proportional to the total stack space used by all branches instead of just the maximum stack space used by any one branch: https://github.com/rust-lang/rust/issues/34283. I believe the issue still isn't fixed. That meant that the Rust version quickly overflowed the stack if you had many nested JavaScript syntax constructs, which was easy to hit in large JavaScript files. There were also random other issues such as Rust's floating-point number parser not actually working in all cases: https://github.com/rust-lang/rust/issues/31407. I also had to spend a lot of time getting multi-threading to work in Rust with all of the lifetime stuff. Go had none of these issues.

The Rust version probably could be made to work at an equivalent speed with enough effort. But at a high-level, Go was much more enjoyable to work with. This is a side project and it has to be fun for me to work on it. The Rust version was actively un-fun for me, both because of all of the workarounds that got in the way and because of the extremely slow compile times. Obviously you can tell from the nature of this project that I value fast build times :)
       
constexpr, 6 hours ago
источник

P

Pavel in rust_offtopic
Piu Piu
Re: ESbuild – A fast JavaScript bundler and minifier i...
       
Author here. I think the Rust vs. Go question is interesting. I actually originally wrote esbuild in Rust and Go, and Go was the clear winner.

The parser written in Go was both faster to compile and faster to execute than the parser in Rust. The Go version compiled something like 100x faster than Rust and ran at something around 10% faster (I forget the exact numbers, sorry). Based on a profile, it looked like the Go version was faster because GC happened on another thread while Rust had to run destructors on the same thread.

The Rust version also had other problems. Many places in my code had switch statements that branched over all AST nodes and in Rust that compiles to code which uses stack space proportional to the total stack space used by all branches instead of just the maximum stack space used by any one branch: https://github.com/rust-lang/rust/issues/34283. I believe the issue still isn't fixed. That meant that the Rust version quickly overflowed the stack if you had many nested JavaScript syntax constructs, which was easy to hit in large JavaScript files. There were also random other issues such as Rust's floating-point number parser not actually working in all cases: https://github.com/rust-lang/rust/issues/31407. I also had to spend a lot of time getting multi-threading to work in Rust with all of the lifetime stuff. Go had none of these issues.

The Rust version probably could be made to work at an equivalent speed with enough effort. But at a high-level, Go was much more enjoyable to work with. This is a side project and it has to be fun for me to work on it. The Rust version was actively un-fun for me, both because of all of the workarounds that got in the way and because of the extremely slow compile times. Obviously you can tell from the nature of this project that I value fast build times :)
       
constexpr, 6 hours ago
ну, спасибо, что не на ноде, уже хорошо
источник

P

Pavel in rust_offtopic
когда уже тулинг вокруг жс перепишут с жс на что побыстрее, невыносимо так долго ждать сборок
источник

PP

Piu Piu in rust_offtopic
Pavel
когда уже тулинг вокруг жс перепишут с жс на что побыстрее, невыносимо так долго ждать сборок
переписали
источник

PP

Piu Piu in rust_offtopic
но никто не юзает
источник

λ

λоλторт in rust_offtopic
Лучший тулинг для жс — отдельный фронтенд разработчик
источник

P

Pavel in rust_offtopic
λоλторт
Лучший тулинг для жс — отдельный фронтенд разработчик
так и делаем, но разработчиков жалко, одноразовые
источник

P

Pavel in rust_offtopic
Piu Piu
но никто не юзает
ну всё, если понадобится писать фронтенд — буду юзать
источник

P

Pavel in rust_offtopic
чем там вебпак заменять? что-то на F было, вроде
источник

PP

Piu Piu in rust_offtopic
источник

λ

λоλторт in rust_offtopic
Pavel
чем там вебпак заменять? что-то на F было, вроде
Parcel
источник

PP

Piu Piu in rust_offtopic
вроде эта на расте
источник

PP

Piu Piu in rust_offtopic
парсел на ноде
источник

PP

Piu Piu in rust_offtopic
кек
источник

PP

Piu Piu in rust_offtopic
а вообще смысл переписывать вебпак
источник

P

Pavel in rust_offtopic
fuse-box, вспомнил
источник

PP

Piu Piu in rust_offtopic
бандлит быстрей чем какой нидь андроид студио аппку
источник

PP

Piu Piu in rust_offtopic
я на работе ору с айосеров у них есть отдельный сервер где билдятся приложения
источник