Subject: [rohc] UDVM - Increasing speed of executing instructions

From: [email-masked]
Date: Fri, 8 Mar 2002 17:40:34 -0600

After going through the UDVM, i feel that many parameters of the instructions are of multi-type (variable coding). It's understandable since it was stated the parameters are compressed to make bytecode compact. There might be some instructions (for e.g SWITCH) where this flexibility MAY HAVE adverse impact on the execution speed. 

  In the SWICTH instruction, depending upon the "value", we cannot jump directly to the instruction we want to start executing. Instead, we have to scan all the parameters till we get the instruction. So, atleast in such instructions i feel that we could go for constant sized parameters (2 bytes would suffice to access any part of memory). Or we could have another variation of switch. 

I would like to hear suggestions.

-Narendra

_______________________________________________
Rohc mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/rohc

---

From: "Dr. Carsten Bormann" <[email-masked]>
Date: Sat, 9 Mar 2002 09:43:01 +0100

> I would like to hear suggestions.

If speed is of concern, you could decode the switch once and cache a table.
Obviously, you then have to "protect" the UDVM memory occupied by the
switch; if it gets written to, you have to discard your cache.
Any scheme that "compiles" information from the UDVM would have to do this,
though.

You do have a point in that we need to consider the assumed CPU cost of
variable-length instructions such as SWITCH, INPUT-HUFFMAN, MULTILOAD.
If we leave it constant, non-optimizing implementations could be attacked.
The table in -05 assigns them CPU costs of "1 + n", so we are covered.

Gruesse, Carsten