this post was submitted on 06 Nov 2024
43 points (97.8% liked)

Ask Lemmy

26734 readers
2091 users here now

A Fediverse community for open-ended, thought provoking questions

Please don't post about US Politics.


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either [email protected] or [email protected]. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email [email protected]. For other questions check our partnered communities list, or use the search function.


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 1 year ago
MODERATORS
 

When will we be able to use any programming language in the web?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 7 points 2 days ago (3 children)

Important to note that WASM will only give you enough performance boost to justify using it if the task is significantly demaning to JS. JS is not slow.

[–] [email protected] 1 points 1 day ago* (last edited 1 day ago)

JavaScript is slow if you need to do things that JavaScript can’t do, such as

  • lots of stack-allocated objects/arrays (in JavaScript you have to heap-allocate them)
  • hash maps with non-primitive types as keys (in JavaScript you have to serialize them to a string)
  • count trailing zero bits (in JavaScript you have to use a lookup table)
[–] [email protected] 7 points 2 days ago (1 children)

JS is slow, but I program Rust and Scala. Every internal app at my company is react based and I spend most my time waiting for that bloated framework to load a simple table. It can take seconds to load a 20 route paginated table from source.

[–] [email protected] 4 points 2 days ago
[–] [email protected] 5 points 2 days ago

JS is not slow.

Since JS is single threaded it can be pretty slow compared to anything being able to use multiple threads