Advanced JS performance with V8 and Web Assembly (Chrome Dev Summit 2016)

Поделиться
HTML-код
  • Опубликовано: 23 окт 2024

Комментарии • 42

  • @rangeoshun1
    @rangeoshun1 8 лет назад +10

    NSync guy, is that you???

  • @CaimAstraea
    @CaimAstraea 7 лет назад

    What are the security concerns regarding this tech? I guess these wasm will run in isolation sandboxed or won't have access to the filesystem?

  • @wombat7961
    @wombat7961 7 лет назад

    As I understand it web assembly probably doesnt work on every device or is dependent on hardware to function... right?

  • @kesuskim6072
    @kesuskim6072 8 лет назад +1

    AWESOME Webassembly :D

  • @MobiusHorizons
    @MobiusHorizons 8 лет назад +9

    was anyone else noticing that he didn't save the file in his demo?

    • @trisolar9041
      @trisolar9041 8 лет назад

      I think he had set DevTools Workspaces before he demos.You can learn more detail here.developers.google.com/web/tools/setup/setup-workflow.

  • @BrianGentles
    @BrianGentles 7 лет назад +1

    My only criticism is that the code is too small to read on a mobile device

  • @NitinPasumarthy
    @NitinPasumarthy 8 лет назад +1

    Any good tutorials on how to create a .wasm file from .c or other popular languages like Python, JAVA?

    • @nolanessigmann6667
      @nolanessigmann6667 8 лет назад +1

      There seem to be a number of compiler toolchains, but the most popular looks like Emscripten (+Binaryen ) to go from c/c++ to asm.js to wasm. I don't know if there are compilers for python or java, but in the case of python I think you'd need to also (or instead) compile a python interpreter into wasm in order to actually be able to run any python code (or bytecode). I don't know anything about java, but i'm pretty sure it also needs to run compiled bytecode on a virtual machine just like python :( That being said though, you could use the emscripten + binaryen toolchain to compile the cpython interpreter (which is written in c) down into wasm (at least I think)! It was kind of a pain for me to get emscripten + friends installed, so if you just want a way of creating .wasm files easily here's a web app that turns .wast files (an s-expression format that wasm likes) into .wasm: cdn.rawgit.com/WebAssembly/wabt/e528a622caa77702209bf0c3654ca78456c41a52/demo/index.html Good luck, and let me know if you find any good ways to go from python to wasm!

    • @NitinPasumarthy
      @NitinPasumarthy 8 лет назад

      Thank you. I tried Emscripten, but I am able to convert .c to .bc or .o only but not .wasm. Am I missing some arguments?

    • @nolanessigmann6667
      @nolanessigmann6667 8 лет назад

      Hmm... Given that it's still much much easier (at least for me) to use a dynamic scripting language like javascript to solve 99% of my client side programming problems I'd have to disagree. I don't use js that much though, so maybe performance its a bigger problem than I realize? Like most recent languages it will have a garbage collector (github.com/WebAssembly/design/blob/master/GC.md)! I think that's a really good thing given that people (especially me...) seem to be intrinsically terrible at managing their own memory (it seems like a lot of modern c++ standards/best practices/and new language features basically revolve around this). Also, the only thing humans might be worse at than that is reasoning about async code, so I'm kinda received the dom has a gc and I don't have to worry about more bs when trying to get my js to work :/

    • @NitinPasumarthy
      @NitinPasumarthy 8 лет назад

      Totally agree. Sorry for not being clear last time. By arguments I meant, the command like arguments for "emcc" compiler :)
      Could you help me with the complete command which takes a .c file and output a .wasm file using Emscripten.

  • @vmbo
    @vmbo 8 лет назад +2

    'Use it with no knowledge of how it was created'

    • @kesuskim6072
      @kesuskim6072 8 лет назад +1

      vmbo# I recently learnet Web, and felt, even these days the Web isn't that open for some pages. We see lots of pages everyday, some do have semantic in good manner, but others do not. We know that HTML5's semantic is good to look at, but many of us still use bunch of divs.
      Not only for those handmade websites, but also on many static websites that were generated from site generators like Jekyll or Hexo, are pretty difficult to figure it out how they generated those pages out of what. We just assumed from some clues and experiences.
      I felt desperate especially on Single Page Application, say React or Angular. I love Angular 2, and enjoy using it. I know how those things work, but I couldn't never imagine how things are made by just looking through result, minified, uglified, tree-shaken, AoT compiled production code. I think things are already complicated enough.

    • @peterhalloran291
      @peterhalloran291 8 лет назад +2

      Well I am pretty sure most web assembly modules will be on github so you can view the C/CPP code there.

    • @vmbo
      @vmbo 8 лет назад

      Kesus Kim That's why I'm mostly still use vanilla Javascript. It would suck if that knowledge would go obsolete because it will be faster to compile some C code or something. Huge frameworks usually slow things down, but if they get a speed bump, everybody will be pushed into the directions of frameworks by Google/Facebook and so on

    • @vmbo
      @vmbo 8 лет назад

      Peter Halloran I'm pretty sure loads of companies and services will just stream assembly code. Will be near impossible to figure out what Google/Facebook/Twitter are doing in the background

    • @kesuskim6072
      @kesuskim6072 8 лет назад

      Well, I ain't that expert, but I think that if you can do with Pure JS, I think it's perfectly OK to go with it. I remembered some guy said JS is Assembly on the Web(maybe he mentioned it before WebAssembly came out) because every peace of code that runs on the Web will boil down to JS. Of course, now it could be either JS or WebAssembly, but as you can see on 'not Web' side, nowadays, only few will make program with Assembly. Even these days, they do program with Assembly especially performance is sooo critical. I think, as the nature of Assembly is for 'critical performance' , JS will be there forever.

  •  8 лет назад

    Why do you use imgs.map instead of imgs.forEach?

    • @Snugs333
      @Snugs333 8 лет назад

      ryanpcmcquen.org/javascript/2015/10/25/map-vs-foreach-vs-for.html
      TL:DR it's easier to chain map() (which will always return an array) vs. chaining forEach()

    •  8 лет назад

      Yes, but in this case he doesn't need chaining (and all of the elements of the imgs array are returning undefined) so it's bad for readability (some people (like me) may expect to get a not-fully-useless array back from that method).

    • @Snugs333
      @Snugs333 8 лет назад

      I would assume personal preference in this case (I also tend to map more than forEach) but I agree that in this case forEach would have been more readable, like you said.

  • @lukejagodzinski
    @lukejagodzinski 8 лет назад

    Anyone know what is the name of the tool that he is using for docking windows on mac?

  • @luisrico4429
    @luisrico4429 7 лет назад

    M encanta aprender cada dia el motivo de mover la app con el fin de bloquear y poder desbloquearlo yo mismo

  • @luisrico4429
    @luisrico4429 7 лет назад

    Deceo con el alma poder desarrollar mas facil laz app dificiles un poco dificil demasiados
    coyotes queriendo. Robar. Pongan empeño y pasiensia usen la mente

  • @davidporterrealestate
    @davidporterrealestate 8 лет назад

    Google needs more diversity

  • @eng3d
    @eng3d 7 лет назад

    20% more its not high performance