[Libre-soc-bugs] [Bug 523] demo program needed showing register dependencies

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Wed Nov 4 16:25:50 GMT 2020


https://bugs.libre-soc.org/show_bug.cgi?id=523

--- Comment #12 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #11)
> jacob.
> 
> it takes over a minute to load.

Probably because it includes a whole markdown renderer/formatter, it was
compiled in debug mode producing a 30MB wasm file, the server doesn't serve the
file using mime type application/wasm when it should (preventing your web
browser from compiling the code as it downloads it, forcing it to download all
of it then compile it), and the server doesn't use gzip compression when it
could.

I uploaded the release-mode version which is 3MB uncompressed and 1MB gzip
compressed. It can probably shrink further if I enable LTO and optimize for
size.

(When uploading it over sftp it was going at 30kB/s and took like a minute for
the 3MB file, not sure if it's on my end or not...)

Also, it takes <1s for it to load on my phone once the web browser has the wasm
file in its cache. <10s if not cached.

> as you add code that startup time is going to get worse and worse.

It probably won't change by a whole lot since most of the code size will be
used by all the support libraries that are included (markdown parser/formatter,
power-instruction-analyzer, etc.)

> 
> whilst it is nice to know that web assembly exists and can be done,
> and is an interesting exercise and learning experience, it's not useful.

It can easily be compiled natively by running `cargo build` (assuming the
dependencies are installed, mostly clang and libc++). It runs at full speed on
the Linux command line, no web browser necessary.

I'll add build instructions to the readme.

> this is getting further down a rabbit hole and further and further
> away from a useful tool that aids and assists in the goal of discussing
> and trying out different strategies that you and i can talk about.

Now that I got the wasm stuff working, next I'll be writing the
microarchitectural simulation table generator in C++ (probably today). You
should be able to work on that part, if you like, since I know you know C++.

> i'm happy for you that you're learning web assembly however please can
> you consider it a "your own time activity" and move the discussion of
> web assembly experimentation to libre-soc-misc, so that it does not
> distract others (Jean-Paul, Staf in particular) during the critical
> lead-up to Dec 2nd?

tried to move to libre-soc-misc, bugzilla didn't accept the CC email address.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list