Stories
Slash Boxes
Comments

SoylentNews is people

Log In

Log In

Create Account  |  Retrieve Password


#freearistarchus!!!

Posted by aristarchus on Sunday January 28 2018, @07:20AM (#2954)
34 Comments
Rehash

We put off part Two of Ethics for Soylentils, even though they are sorely needed, for another unfortunate series of events: aristarchus censored yet again.

As some are aware, since the unpleasantness at Charlottesville last August, I have been submitting articles on the self-named "alt-right". Nearly all of these have been rejected. That in itself does not disturb me, I tend to call a spade a stupid idiot white supremacist homosexual gayhater who cannot get dates. But that is just me. No, here we have a case, for the second time, when one of my submissions has been accepted, but then disappeared. This worries me. It is one thing to be rejected, with which I have no problem, and I will not grouse about. But to be accepted, and then the Man in the High Castle steps in to block the Fine Article? Sounds like censorship to me, and must also seem that way to at least some of the editorial staff.

So here is my submission that was accepted, but never made it to the front page:

aristarchus [soylentnews.org] writes:

Not sure about this one. Seems too early to panic. But evidently, Chelsea (nee Bradley) Manning attended a party of the alt-right, white, and light. Article is on Slate [slate.com]:

        Chelsea Manning went to a rather awkward party on Saturday night. It’s something she’s been able to do since May, four months after an outgoing President Obama commuted the former U.S. Army intelligence analyst’s prison sentence after she had served seven years behind bars for leaking 750,000 sensitive military and diplomatic documents on Iraq and Afghanistan.

Well that alone should get Soylentils all a buzz, especially the ones who are "Stolen Valor" participants.
But there is more to the story, and the party.

        In a BuzzFeed report, partygoers touted Manning’s attendance as proof of their own inclusivity. “I truly don’t want to speak for her but I guess she respects what this is all about,” said Jack Posobiec, an infamous alt-right provocateur and vocal Trump supporter. Cernovich later tweeted that he was “glad she stopped by.”

                Yes I literally shook hands with Chelsea Manning tonigut, the left is freaking out, it was not a big deal. It was a huge and amazing party. Glad she stopped by. All are welcome to party with me.
                                                                                — Mike Cernovich ?? (@Cernovich) January 21, 2018

If it is alright with the dudes that promoted Pizzagate, that someone who released the child-murdering conspiracy theory that is the US Military is at their party, well, it it alright with me.
But:

        In other words, Manning claims she attended the party to learn more about a group of people she believes push a dangerous ideology that doesn’t deserve a platform. Gathering “intelligence” on “fascists” is probably not the most pressing activity when you’re facing a difficult Senate race, nor is the inconspicuousness presumably required of such a secret mission realistic if you’re as famous as Chelsea Manning. If that is what she was up to, it’s also a move that could be construed as evidence of an affiliation with antifa, the anti-fascist activists on the left that are often associated with violence and direct-action tactics that sometimes break the law. Antifa’s tactics also include conducting deep research on far-right organizers, sometimes by embedding activists at events.

OK, you know the drill, Soylentils! Look to your Right! Now look to your Left! One of these people is a Microsoft shill. Careful what you say.

Other coverage: http://www.newsweek.com/chelsea-manning-says-she-attended-pro-trump-new-york-ball-gather-intelligence-787929 [newsweek.com] [newsweek.com]
https://www.theguardian.com/world/2018/jan/22/an-evening-with-deplorables-inside-the-far-right-party-in-manhattan [theguardian.com] [theguardian.com]
http://www.newsweek.com/white-supremacist-accused-amtrak-terror-attack-also-attended-alt-right-event-771495 [newsweek.com] [newsweek.com]
https://www.forbes.com/forbes/welcome/?toURL=https://www.forbes.com/sites/lukethompson/2018/01/04/the-x-files-alt-right-gillian-anderson-david-duchovny/&refURL=https://www.google.com/&referrer=https://www.google.com/ [forbes.com] [forbes.com]
Only including the Forbes link because their site is opaque if you block javascript, and I am hoping someone can tell us what it says!

And, the evening was not a total loss [nydailynews.com]. One Nazi got punched in the face. So, who was making money off the alt-right in this instance? And how is this submission user hostile?

As usual, all the actual links are stripped, and this is actually the version I posted after this submission was put into stasis. But the points remain the same. (Except, what happened to the User:Hostile tag? It was there until I pointed it out. Is there a Hostile User list on SoylentNews? Are you now, or have you ever been, a member of the antifa party? The Mighty McCarthy Buzzard! ) It was pertinent enough for some editor to approve of it, but beyond the pale for some other editor, for some other reason, which I presume we will never know.

In other news, janrinok sent me a very nice Direct Message, (note: normal Soylentils do not have these, so they are like messages from the Gods!), where he said he read much of the past history of the censorship of the arirstarchus on this site, but he did not see it as such. And he expressed some concern that my submissions might open SoylentNews up to a lawsuit (Peter Thiel is an ass!). I do not find that convincing, and I still believe that it is the political bias of several (I could name names, and name names of people who were to become eds, and were mysteriously dropped?) members of the editorial staff, and The Mighty Busstard.

Strange, janrinok seemed to think that I took TMB to be my nemesis. Nothing could be further from the truth. I consider TMB to be my student. A recalcitrant, stubborn, and significantly developmentally delayed student, but I have hope for him. In the long run.

So I encourage everyone to add the #freearistarchus!!! tag to your sig, even though we are not Twitter (thank the gods), in order to shake up the eds. The promise that was Buckfeta is in danger of being lost, as I have long pointed out. So we need to decide what SoylentNews is to be, a libertarian backwater blog, or an actual replacement for the site that must not be named, for the same reason that site was what it was.

Oh, and if any of you disagree with me, I will more likely than not send you over to Larry the Cable Guy. Let's git 'er done!

Trump ordered Mueller fired back in June; then lied about it

Posted by DeathMonkey on Friday January 26 2018, @05:17PM (#2951)
22 Comments

bob_super wizard

Posted by takyon on Friday January 26 2018, @03:38PM (#2950)
2 Comments
/dev/random

Found this comment while I was searching for NASA GOLD stuff.

Zuma!

Grope Central

Posted by takyon on Wednesday January 24 2018, @11:58AM (#2946)
15 Comments

Reminder for Intel Apologists

Posted by takyon on Sunday January 21 2018, @12:37PM (#2941)
3 Comments
Business

Intel Has a Big Problem. It Needs to Act Like It

During the six months Intel was quietly working to try to fix the vulnerabilities, Krzanich sold $24 million in company shares. Intel says the stock sale was part of a plan that had been in place before anyone there knew about Meltdown or Spectre, but the day after Krzanich’s CES speech, two U.S. senators sent letters to the Securities and Exchange Commission and the Department of Justice demanding investigations. Consumer and shareholder lawyers have filed a dozen class actions against Intel, and there are few signs the pressure will let up on Krzanich anytime soon. In a research note, an analyst for Sanford C. Bernstein & Co. called the stock sale “indefensible.”

Trump signs FISA law he claims was used to spy on him

Posted by DeathMonkey on Saturday January 20 2018, @03:16AM (#2937)
11 Comments
News

President Trump signed a bill Friday to reauthorize a controversial government surveillance program, extending the ability of law enforcement officials to collect and keep — but not always see — the private communications of American citizens.

Trump first suggested a year ago — with no supporting evidence — that Obama authorized eavesdropping on Trump Tower during the election. He made a similar suggestion last week when he tweeted that the law had been used "to so badly surveil and abuse the Trump campaign by the previous administration."

The bill was set to expire Friday unless Trump signed the renewal into law. It has now been approved by Congress three times under three different presidents.

Trump signs bill extending surveillance law — the same law he says was used to spy on him

Isegoria

Posted by turgid on Tuesday January 16 2018, @11:26PM (#2933)
3 Comments
Topics

From The Guardian:

Intriguingly, the Ancient Greeks had a word for what’s missing: isegoria, which they thought must accompany freedom of speech, and which means equality of speech – people need to hear their own voices reflected in political discourse.

Well, we have Farcebook and Witter.

My Ideal Alarm Clock, Part 1

Posted by cafebabe on Tuesday January 16 2018, @08:15PM (#2932)
4 Comments
Hardware

After thinking about micro-controllers and high availability using a clock as an example, I realised that I'm in the unusual position of being able to make my ideal alarm clock. This is only slightly more advanced than the generic quiz game buzzer implementation with the addition of interrupts, LED multiplexing and switch de-bounce. This is all within my ability. Or, at least, it should be. Indeed, I've seen a founder of the Arduino Project struggle with an 8×8 LED matrix. This person also described frying pan technique for surface mount soldering. Well, I've seen their software and I've seen their hardware and I conclude that making an alarm clock can be achieved with similar perseverance. Specifically, I have:-

  • Derived an H-Bridge from first principles.
  • Likewise for MOSFET rectification.
  • Put a rectified sine wave through a D-Class amplifier to obtain bi-directional motor movement with more control than an H-Bridge.
  • Used a combination of tilt switches, analog integrator, VCO [Voltage Controlled Oscillator] and servos to make an approximation of the Nekko EEG Cat Ears.
  • Arranged decimal counter chips to light 2×10 LEDs in sequence.
  • Written PIC assembly, 6502 assembly, Arduino C and similar.
  • Written signal handling software in C and Perl.

However, I:-

  • Struggle to deploy compiled code due to the opaque protocols being used.
  • Dropped modulo operator functionality somewhere while avoiding patronizing user interfaces.
  • Failed to get DACs working but this may be Voltage level incompatibility.

I have reached the stage, which is common among electronic engineering students, where making a clock is the test of ability. This is not a certain project but much else remains theoretical if this does not occur. Anyhow, let's do this properly. We may even get a MISRA C alarm clock.

Specification

Functionality For Version 1: Buttons for inputs. Probably about six. Multiplexed, seven segment LED digits for output. May be jumbo size. Probably about six. Specifically, HH:MM:SS in 24 hour format only. One modulated square wave in audio range to drive speaker. Can be derived from software or multiple oscillators. One digital output stays high when alarm triggers. Can be used to make clock radio. Or, because we're geeks, drive a relay for coffee maker or similar. Serial output in format compatible with gpsd. In combination with ntpd, this allows home network time to be set from alarm clock.

Functionality For Version 2: Three channel PWM output for dawn light prior to alarm.

Functionality For Version 3: Battery back-up RTC [Real-Time Clock]. This allows clock to count time when unpowered.

Much of this can be implemented with decimal counter chips. Counter chips with decoded outputs are preferable for Nixie Tubes while BCD outputs are preferable for seven segment displays.

Full functionality requires software. Due to laziness, I suggest using an Arduino Nano (Atmel AVR micro-controller with 8KB ROM). This also allows clock to be powered from USB. For example, a wall-wart phone charger. With or without RTC, date handling is awkward. Will conceptually reserve two places of LED multiplexing for century. So, display may be CCYY/MM/DD or YY/MM/DD or HH:MM:SS. This requires either 8×7 outputs or 6×7 outputs. With either a four digit year or a two digit year, it is possible to calculate day of week and have a seven day alarm clock. The trivial use case is setting the alarm one hour later for Saturday and Sunday.

With some changes to software, it is possible to make joke clocks which don't have Monday. It may also be possible to make Julian/Gregorian, Chinese or Mayan mode. Nominally, day of week output uses LED seven segment decimal point or similar. Internal calculation may or may not start from Sunday being zero. If possible, day of week calculation should extend beyond Year 2099.

After thinking about this problem for three days, I wrote most of the software in one programming session. Buttons are defined as "prev", "next" "up", "down", alarm "toggle", "snooze", "start" and "stop". From this, it is possible to set year, month, day, hour, minute, second and seven alarms to hour, minute and second. Like the buzzer game, all buttons may be wired high or low. This also allows "toggle" to be a momentary switch or a latching switch. "Snooze" suppresses alarm for 180 seconds plus randon jitter. (The fixed 300 seconds of Symbian 70 allows me to fall asleep 18 times or more over 90 minutes or more.)

Pressing "stop" once cancels the alarm sound but leaves the relay active. Pressing "stop" again cancels the relay. Pressing "start" enables the relay but not the alarm sound. Unfortunately, without the serial functionality, the compiled program requires 7KB or the 8KB ROM. I've not exhausted the I/O of Arduino Due but have exhausted I/O of Arduino Nano with 16 multiplex outputs, 8 digital inputs and 3 digital outputs. I considered mixing common cathode and common anode seven segment displays. Effectively, half of the LEDs would be wired backwards in an attempt to get more output. Unfortunately, this is a subset of the infamous Charlieplexing where LEDs are lit by a difference of Voltage between I/O pins. Although it is possible to control n(n-1) segments for large n, it works best when the total lit segments is 10 or less. There are also current limits. Furthermore, wiring arrangements may be fragile.

It is possible to use external shift registers but multiplexing the multiplexing will make the software particularly obtuse and I may have difficulty getting this working. In the most extreme case, it is possible to reduce I/O to seven lines: input stream, output stream, clock, latch, speaker output, relay output and dedicated output to gpsd. I'm not controlling a mains relay via shift registers. Nor am I sending serial via a shift register.

I checked code quality and the majority of warnings derive from #include <Arduino.h>. Regardless, the case statements to set time are too long. This may also be why compiled output is 7KB. That's too much for a clock and significantly more functionality is planned. Switch de-bounce also requires improvement.

After an US$8 retail purchase of a mix bag of LEDs and LCDs, which, crazily, includes a 1 row × 16 column LCD text display, I'm also considering a really fancy power-on light test. Something like a PWM snaking figure-of-eight across each digit.

What Kind Of Shonky Software Do People Write?

Posted by cafebabe on Tuesday January 16 2018, @08:12PM (#2931)
2 Comments
Software

I've been curious about programming standards and now that I'm actively writing software for process control (rather than wrangling other people's software without success) now would be a good time to make the software as reliable as possible. Arguably, writing in C or C++ is the first mistake but it is hard to avoid when, for example, I2C devices only have library code written in C. Even a person who refused to deploy C would be required to read it and use it for reference tests.

I found an old, unauthorized copy of the MISRA C 2004 Specification. This was originally developed for vehicle safety and is now used in medical, aerospace and other industries. And now you can add the space cadets in the hydroponics industry.

I feared looking at MISRA because I was under the false impression that it involved bone-headed stuff like writing conditions backwards to prevent accidental assignment. Feel free to do that but the prefered method is static analysis. Overall, the MISRA guidelines are very good to the extent that I'm considering a license for the current version.

Reading the standard proceeds as follows. A right-minded person initially thinks "What kind of shonky code are people writing?" Sooner or later, this is followed by "Ah, I need to change something in my current project." This is followed by "I need to change something in a previous project." This is followed by "I need to change everything I've ever written." This is followed by the later realization that not even a typical example of "Hello World" is written correctly. (Specifically, no function prototype or library call return code check.)

Writing C to MISRA standard is an attainable goal but almost everything falls short. I mentioned this to some programmers. No-one thought any of it was idiotic but some parts of conversation began with "I don't do that because ..." and omissions included declarations, error checks and default cases. I defend multiple returns from a function under specific circumstances in which execution is effectively a try ... catch construct across two functions. However, that works best in a server environment for the purpose of avoiding memory leaks. For MISRA's focus, embedded applications, even the use of dynamic memory allocation is discouraged. And that removes one of the main uses for multiple returns. An improvised try ... catch can also be used to fail fast. This seems problematic until the difference between library code and application code is considered. Library code throws errors which cannot be handled due to lack of context. Application code catches errors because the context for handling them is known. Unfortunately, "Never test for an error which you cannot handle." and an embedded system with all unhandled exceptions tied to "reboot" may lead to device failure mode in which there is a constant cycle of reboots and no further diagnostic information.

So, what kind of shonky software do people write? I let a Lisp hacker look at the code for a virtual processor. The code review can be summarized as "Your code embodies everything that's wrong about C." followed by particular ire for a portable attempt to define a 16 bit signed integer which is clearly labelled as working on gcc and clang but possibly not further. After "Well, at least you didn't use recursive macros." I noted the part where 4 byte BER fetch is implemented as a macro which is nested within itself.

That's a problem. Some embedded C is stuck in a timewarp between Kernighan & Richie's traditional C and the ISO C 1999 Standard. My style is closest to the ISO C 1990 Standard and that works fine for embedded software. However, between 1969 (when C was being developed on a 16 bit, two's compliment computer) and 1999 (when int16_t was standardized), it wasn't possible to reliably define a signed 16 bit integer and, after almost 50 years of C, it remains problematic in some cases.

This is part of a wider problem where implicit assumptions and conflations are common reasons for software being inadequate. Things like currency handling, date formats (especially two digit years), character encoding, disability support - and the magnitude of numbers.

It also fits the observation that the installed base of technology is half of the age of the technology unless steps are taken to actively skew the age. This was certainly the case for web browsers before automatic updates became common. However, it seems to apply to programmers. Effort to drop C entirely (often by people encouraging WebAssembly) is an over-reaction (and contradictory). However, tests and standards have to be greatly improved.

I wrote some regular expressions in Perl4 to test quality of C. Yes, the old joke is "Now I've got two problems." More seriously, dodgy scaffolding is allowed by MISRA C 2004 but not in deployed software. In this case, you can verify that nothing I've previously written will pass all of these tests. The worrying part is that I only wrote five easy tests out of about 100.

After unpacking the archive on a Unix system, make quality applies tests to hello.c and finds a missing function prototype but doesn't find the missing return check. Flags on the compiler find these problems and produce a warning that argc and argv aren't used. Technically, these should also be const. So, that's six problems with "Hello World". gcc and my crude checks find an overlapping subset but important problems are missed.

begin 644 code-quality-check-dist-20180112-104505.tar.gz
M'XL("+&16%H"`V-O9&4M<75A;&ET>2UC:&5C:RUD:7-T+3(P,3@P,3$R+3$P
M-#4P-2YT87(`[1IK4]PXDJ_QKU#(D'D0C^UYAA!SQ1)RH0ZRV4`J=8O98&QY
MQH=?*WM@"+"__;HEOP8F9)*09*O6316VI%:KN]4OR6.%-I7_G)B>FUS(UIA:
MI[+MQHG<4;6GJJ9U9$WM]=6^LF>>4L?UZ-)7@`HP[/?QJ0W[:OF)T!OV.DM:
MM],9J`.U/QPNJ5J_W^DM$77I!\`D3DQ&R-(_%!XIDY@I)VZ@T.",^+#+DO2(
M;(%5D-^$59`MM`JR/37]R*,D,P3`:FPUT4S(P9C"C"`.6>)._+;T",8R^R&H
MWD22]C;_LZUS\B]V]@_TM]N;+_:VR<[K_8/-W=V<*!$6:,:Q.PK:D9>V3[S0
M.BV:SB2P$C<,9(^6D"(6)F'19#29,#X\IIX7MBUI:TL?69:TO[WU3I?ER&2F
M3\S8#&1@T3K5->FW=YN[NCPB\GO3\^`_G2;,)')$;3-(7(L`HJV[<;CV=&WM
MF;:VM@8X\=BTPW-XB4(W2"B33>8F8VA;)G@1.E;V#LH<!3@C8:Z5"':3BXC&
MT.>[('$PFNVTPN",LA@$E=[L[&[G/(]&ENR[@3RF9A2['ZG>[0P'3\G-83J-
MS,#6NP-IZ]?=7W79<9D)6AD!/3T,J/3ZW1[0=%)V0EC*\5`2)PAE5#^UY8^4
MA7'1`Q(`CX$9I'V@G2C"+M],QM+^SN\%C[XYE=T`\"D\XB"643R/ZCV8:5,'
M]!2%$;R'OIO(#LR@<JI`09J:S+L0%&`B]*7$/!<F<"H^92,J@XY@]X($.1I9
M,2#XV5N<OWEF/FPZN$>,>J%IIX*!N=AR'%'K9EL62"6)QB&&1IM&R5@?D#FR
M,FI-8,?.:(JD2OMOME'+C(;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:EX.%:%RO-Y+!\RF5YBC-O
MBC2SZK7T)85((\WBZYBFC4OC>K%DGG8U#M>-RZ.F\ABUW*AI3VJ=)[5N4Z$N
MUBG`"9R)J`DG_QJ%S6KPCT.G]"(F*R!]?K1^F'/*!034Z^:777A9'B@C35@P
MO4[L$")]$"9D#.&VE-#*L?4.WIRYO%E?Q5LIE\YE+>=]0=X*O=VA-K2@G&$2
M4%+"6:3LL5W'H0R\:+Z6S<`N2P;<IM+]O`-I!7_C_)]_S[[7^]]N?YCE_V&O
MB_>_0U6MSO]_B_O?O8F7N/B[K[<B,^U#VJ;%YZ#\AN#G%@BU.&'F!3_%NP'>
M`2YVC/^^I^""D]M'6N-$N%)Z!PI9NU1ZI#/3T_KMP_#L65@@;VC??@S&CTLI
M.0);[T/N2@N2^-9I>$:XF]?6MV1KM^X6F&]?=CL!N0:I\3Z!<8=`?F:?*:.0
MPR8!&E!*5!P6!?M5$OOZ^)_^6.FKUL`@/^CU/OG]7QOT\M__]O#^5^MWM>K[
M_P\!I45>\1^6O0^99Y.6`K'9#2QO`C'@>9S8;M@>;_`?>Q'?=(,&OIAL9#VQ
MQB9KM?#]K.2D3F-9D#M'<@_![?C-BG#.AMJLG+"""BJHH((**JB@@@HJJ*""
C"BJHH((**JB@@@HJJ*"""BJHH((**JC@GN'_5VX!IP!0````
`
end

(Usual instructions for uudecode process.)

My Ideal Processor, Part 10

Posted by cafebabe on Tuesday January 16 2018, @08:10PM (#2930)
0 Comments
Hardware

(This is the 61st of many promised articles which explain an idea in isolation. It is hoped that ideas may be adapted, linked together and implemented.)

I've been working on a virtual processor and I've got benchmark figures. The virtual processor is intended for process control but it may have general use or use on FPGA, GPU, optical computer or mainframe. In particular, there is a market for object code portability and high uptime across x86, ARM, AVR and other processor architectures.

I've been working on the instruction set and I've worked through a long list of decisions which are loosely connected. These aren't choices which can be made in isolation and without consequence elsewhere in a design. However, each choice makes minimal progress because a sensible set of choices may lead to something impractical. For example, 64 registers × 64 bit requires a 4 kilobit context switch. Numerous registers are great. Wide registers are great. But fast interrupts are also great.

After going through this process repeatedly for more than three years, I've devised a fairly conventional processor architecture (3-address, Harvard architecture) which provides cross-compatibility for 8 bit, 16 bit, 32 bit, 64 bit or possibly larger registers and address pointers.

I wrote a fetch-execute instruction interpreter and then called it from a loop which tries all permutations of the 2^28 instructions. This crashed repeatedly. The optional floating point encountered divide by zero. After #include <signal.h> so that SIGFPE (floating point exception) could be set to SIG_IGN (ignore signal), it was trivial to set SIGUSR1 and SIGUSR2 to trigger virtual processor interrupts. It optionally outputs a PID file to make signal invocation easier. That's great fun. With one Unix command, it is possible to send virtual interrupts to a virtual processor.

Further testing found further problems in approximate order of difficulty. Apparently, I missed a bound check on a virtual stack. After these problems, the test ran smoothly. I expected the first full run of 256 million instructions to require about 30 minutes. It finished within five minutes. That's approximately one million instructions per second. After brief disassembly and seeing 140 byte stack references, I applied the standard flags. This reduced the frequency of stack references and their severity to 40 bytes. I also obtained the usual double performance. That's approximately two million virtual instructions per second for integer performance and 0.4 MIPS for a mixed integer and float workload. Optimistically, on a Raspberry Pi Model B Revision 2 with 750MHz clock and 697 BogoMIPS (approximately 14 instructions per 15 clock cycles), it takes a minimum of 132 clock cycles to go around the fetch-execute loop but many of the instructions exit early due to bogus opcodes, bound check failures or similar.

Despite being a 64 bit SIMD implementation which is vastly more powerful than a 16 bit computer from the 1980s, this arrangement captures less than 1% of the efficiency of the host architecture. I looked at the disassembly more closely. My code has addition of 8 bit integers and this involves a loop with eight fixed iterations. gcc correctly unrolls this loops and converts it to SIMD instructions. However, this doesn't occur for floating point instructions. This may be a limitation of the compiler or the target architecture. (ARMv6 with Neon.)

What am I trying to achieve? Optimistically, it is possible to achieve 1/3 efficiency. That would be one clock cycle to fetch a virtual instruction, one clock cycle for branch fan-out to each case statement and one clock cycle to implement a virtual instruction on native hardware. There is no need to return to start because duplicate fetch and decode can be placed at the end of each case. Therefore, bytecode interpreter execution flow may bounce around unstructured code as required.

Nowadays, I presume that fetch and branch incurs instruction pipeline stall of at least two clock cycles. Also, I'm attempting to implement 8 register × 64 bit on hardware which is 8 register × 32 bit. Furthermore, operations on arbitrary virtual registers (nominally R0-R7) requires transfer to internal registers (nominally A, B and C) where cases may perform A=B+C or A+=B*C. This particular step would be easier with a stack virtual machine but difficulties occur elsewhere.

Current efficiency is a mystery. Maximum efficiency is a mystery. My implementation won't match the execution speed of Dalvik which is deprecated in favor of ART [Android RunTime] which is claimed by Oracle to be have less than 1% of the efficiency of HotSpot in some circumstances. That's a familiar figure.

My interpreter and registers may exceed the size of the native processor cache. Like Dalvik, the opcode is in the least significant bits. This avoids bit shift prior to branch. That sounds clever and planned but it isn't possible to put an opcode elsewhere and get a broad range of 1 byte BER packed instructions. However, when testing instruction patterns sequentially, the cases of the instruction interpreter are called in rotation. This may incur significant cache churn. If this is the case, I might get significantly more throughput by testing a more realistic distribution of opcodes.

If this was intended to run games and apps, it would be fast enough to run Leisure Suit Larry but not fast enough to run Fruit Ninja.