Konstantinos Margaritis: SIMD on javascript, MHO
Just read the Mozilla announcement on SIMD.js and I can say I got mixed feelings about this.
I don't really comment other news/blogs/announcements, but this is an exception.
On one hand, I definitely welcome more SIMD use everywhere, being a SIMD advocate and enthusiast for many years (since 2004 actually). So seeing more of it and by someone such as Mozilla, that's even better! On the other hand, wait, that's SIMD in Javascript?!? Really? Why? As if we already covered native coverage of SIMD in every other part, including the browser itself (No browser uses SIMD extensively in its core, though that would prove to be of actual benefit, the only SIMD code I know of is in the media playback code, which is usually some external library like ffmpeg/x264/etc that already has SIMD optimized parts anyway.
So, instead of using resources to optimize the core browser with SIMD -I'm sure there will be plenty of opportunities in the codebase for such optimizations- so that every web application, including Javascript ones will be optimized, or even the JS JITs themselves, yet Mozilla wants to push the effort to the web app developer to use their SIMD.js to do the equivalent of what SIMD coders have been doing to native apps for a long time now, only for JS apps.
Ok, so what's the gain? I read the PDF presentation that shows mandebrot.js to go from 9 FPS to 37FPS using SIMD.js. Admittedly that's impressive. But it also proves that the whole buzz about lower energy footprint computers, power efficiency is just useless. Why is that? For comparison running Xaos (fractal/mandelbrot program) on my very low end PC (2-core Athlon X2, AM2 socket, so DDR2) gives me ~250FPS, and I'm not even sure it's using SSE at all (from a simple check it doesn't). Zooming is realtime and at full detail. In the same talk, there was a benchmark of LLVM Javascript being as fast as C++ or 1.5x the native running time. I admit haven't tried the tests listed, but the mandelbrot test was using asm.js and 9 is definetely not 250/1.5. But I guess I'm just picky.
So, the latest trend of moving everything to the browser and JS,means that instead of optimizing my apps to run great on native, instead of making stuff running faster on my 5Wt big.Little 8-core ARM SoC, I have to get a much more power-hungry CPU to see the same performance. I'm totally against that. I want my newer CPUs, who are more energy-efficient and faster to actually feel like THAT. I don't want to upgrade just to experience the performance of a 486 20 years ago!
The talk mentioned HTML5 (and hence javascript) overtaking all other platforms for application development everywhere, including the smartphones. I certainly hope that's not the case, and I know of many people who also don't feel that way. We're not buying the "Everything on the web/cloud" paradigm, but I guess we're just a minority.
I could go on for a long time, but I have an actual SIMD-related bug to fix, cheers.
Note: I used to have comments enabled on my blog, but moderating spam was too time consuming, even with CAPTCHAs, so I disabled them entirely, if anyone could suggest of a better method, I'd gladly take advice -have been thinking about disqus, not sure if it's actually a good solution).
I'm
We already edit
I ve many distributed Linux instances across several clouds, be them global, such as
If you have users behind NAT, you ll also need a TURN server for relay:
In both cases, setup is not too difficult, particularly if using
Glamor Cleanup
Before I start really digging in to reworking the Render support in
Glamor, I wanted to take a stab at cleaning up some cruft which has
accumulated in Glamor over the years. Here's what I've done so far.
Get rid of the Intel fallback paths
I think it's my fault, and I'm sorry.
The original Intel Glamor code has Glamor implement accelerated
operations using GL, and when those fail, the Intel driver would fall
back to its existing code, either UXA acceleration or software. Note
that it wasn't Glamor doing these fallbacks, instead the Intel
driver had a complete wrapper around every rendering API, calling
special Glamor entry points which would return FALSE if GL couldn't
accelerate the specified operation.
The thinking was that when GL couldn't do something, it would be far
faster to take advantage of the existing UXA paths than to have Glamor
fall back to pulling the bits out of GL, drawing to temporary images
with software, and pushing the bits back to GL.
And, that may well be true, but what we've managed to prove is that
there really aren't any interesting rendering paths which GL can't
do directly. For core X, the only fallbacks we have today are for
operations using a weird planemask, and some CopyPlane operations. For
Render, essentially everything can be accelerated with the GPU.
At this point, the old Intel Glamor implementation is a lot of ugly
code in Glamor without any use. I posted patches to the Intel driver
several months ago which fix the Glamor bits there, but they haven't
seen any review yet and so they haven't been merged, although I've
been running them since 1.16 was released...
Getting rid of this support let me eliminate all of the _nf functions
exported from Glamor, along with the GLAMOR_USE_SCREEN and
GLAMOR_USE_PICTURE_SCREEN parameters, along with the
GLAMOR_SEPARATE_TEXTURE pixmap type.
Force all pixmaps to have exact allocations
Glamor has a cache of recently used textures that it uses to avoid
allocating and de-allocating GL textures rapidly. For pixmaps small
enough to fit in a single texture, Glamor would use a cache texture
that was larger than the pixmap.
I disabled this when I rewrote the Glamor rendering code for core X;
that code used texture repeat modes for tiles and stipples; if the
texture wasn't the same size as the pixmap, then texturing would fail.
On the Render side, Glamor would actually reallocate pixmaps used as
repeating texture sources. I could have fixed up the core rendering
code to use this, but I decided instead to just simplify things and
eliminate the ability to use larger textures for pixmaps everywhere.
Remove redundant pixmap and screen private pointers
Every Glamor pixmap private structure had a pointer back to the pixmap
it was allocated for, along with a pointer to the the Glamor screen
private structure for the related screen. There's no particularly good
reason for this, other than making it possible to pass just the Glamor
pixmap private around a lot of places. So, I removed those pointers
and fixed up the functions to take the necessary extra or replaced
parameters.
Similarly, every Glamor fbo had a pointer back to the Glamor screen
private too; I removed that and now pass the Glamor screen private
parameter as needed.
Reducing pixmap private complexity
Glamor had three separate kinds of pixmap private structures, one for
'normal' pixmaps (those allocated by them selves in a single FBO), one
for 'large' pixmaps, where the pixmap was tiled across many FBOs, and
a third for 'atlas' pixmaps, which presumably would be a single FBO
holding multiple pixmaps.
The 'atlas' form was never actually implemented, so it was pretty easy
to get rid of that.
For large vs normal pixmaps, the solution was to move the extra data
needed by large pixmaps into the same structure as that used by normal
pixmaps and simply initialize those elements correctly in all
cases. Now, most code can ignore the difference and simply walk the
array of FBOs as necessary.
The other thing I did was to shrink the number of possible pixmap
types from 8 down to three. Glamor now exposes just these possible
pixmap types:
Last Wednesday I had the pleasure and honor to have a great guest again at my class:
If someone would have told me that I would visit three feminist events this year I would have slowly nodded at them and responded with "yeah, sure..." not believing it. But sometimes things take their own turns.
It all started with the
I've spent the past thirty minutes installing FreeBSD as a KVM guest. This mostly involved fetching the ISO (I chose the latest stable release 10.0), and accepting all the defaults. A pleasant experience.
As I'm running KVM inside 
Running git grep under emacs compilation mode.
It's driving me nuts because there's 0xfeff(BOM) at the beginning which seems to break file name matching.
I've taught my laptop to wake up at 7:30 in the morning. When it does, it
will run