Damien George
8456cc017b
py: Compress load-int, load-fast, store-fast, unop, binop bytecodes.
...
There is a lot potential in compress bytecodes and make more use of the
coding space. This patch introduces "multi" bytecodes which have their
argument included in the bytecode (by addition).
UNARY_OP and BINARY_OP now no longer take a 1 byte argument for the
opcode. Rather, the opcode is included in the first byte itself.
LOAD_FAST_[0,1,2] and STORE_FAST_[0,1,2] are removed in favour of their
multi versions, which can take an argument between 0 and 15 inclusive.
The majority of LOAD_FAST/STORE_FAST codes fit in this range and so this
saves a byte for each of these.
LOAD_CONST_SMALL_INT_MULTI is used to load small ints between -16 and 47
inclusive. Such ints are quite common and now only need 1 byte to
store, and now have much faster decoding.
In all this patch saves about 2% RAM for typically bytecode (1.8% on
64-bit test, 2.5% on pyboard test). It also reduces the binary size
(because bytecodes are simplified) and doesn't harm performance.
2014-10-25 20:23:13 +01:00
..
2014-08-30 14:59:21 +01:00
2014-10-12 16:59:29 +01:00
2014-10-12 16:59:29 +01:00
2014-09-29 19:42:06 +01:00
2014-09-29 19:42:06 +01:00
2014-10-12 16:59:29 +01:00
2014-10-12 16:59:29 +01:00
2014-10-12 16:59:29 +01:00
2014-10-12 16:59:29 +01:00
2014-10-25 20:23:13 +01:00
2014-10-25 20:23:13 +01:00
2014-10-25 20:23:13 +01:00
2014-10-06 15:05:35 +00:00
2014-10-06 15:05:35 +00:00
2014-10-22 23:05:50 +01:00
2014-10-22 23:20:15 +01:00
2014-10-05 20:13:34 +01:00
2014-10-12 20:18:40 +01:00
2014-10-23 13:34:35 +01:00
2014-10-12 20:18:40 +01:00
2014-10-17 17:57:33 +00:00
2014-10-05 20:13:34 +01:00
2014-09-08 23:05:16 +01:00
2014-10-25 20:23:13 +01:00
2014-09-08 23:05:16 +01:00
2014-09-08 23:05:16 +01:00
2014-10-25 20:23:13 +01:00
2014-10-25 20:23:13 +01:00
2014-09-29 19:42:06 +01:00
2014-10-19 19:00:51 +01:00
2014-09-08 23:05:16 +01:00
2014-07-17 20:45:58 +03:00
2014-05-03 23:27:38 +01:00
2014-10-24 23:12:25 +01:00
2014-10-24 23:12:25 +01:00
2014-05-03 23:27:38 +01:00
2014-10-09 16:53:37 +01:00
2014-07-30 11:46:05 +01:00
2014-10-09 16:53:37 +01:00
2014-10-09 16:53:37 +01:00
2014-05-03 23:27:38 +01:00
2014-09-05 13:16:19 +01:00
2014-10-23 12:02:00 +01:00
2014-08-30 13:23:35 +01:00
2014-10-09 16:53:37 +01:00
2014-06-07 13:14:45 +01:00
2014-07-02 13:42:37 +01:00
2014-06-27 21:02:04 +03:00
2014-08-11 22:19:44 +00:00
2014-06-21 22:43:22 +03:00
2014-08-10 17:50:28 +01:00
2014-06-21 22:43:22 +03:00
2014-08-10 17:50:28 +01:00
2014-07-31 10:49:14 +01:00
2014-10-06 15:05:35 +00:00
2014-09-15 15:53:09 +01:00
2014-10-23 13:34:35 +01:00
2014-10-03 17:44:14 +00:00
2014-10-03 17:44:14 +00:00
2014-09-29 22:10:41 +01:00
2014-06-22 01:40:45 +03:00
2014-05-03 23:27:38 +01:00
2014-09-26 13:07:26 +00:00
2014-09-26 13:07:26 +00:00
2014-09-26 13:07:26 +00:00
2014-09-07 20:41:09 +01:00
2014-10-25 20:23:13 +01:00
2014-10-23 13:34:35 +01:00
2014-08-30 14:59:21 +01:00
2014-09-23 14:15:45 +00:00
2014-10-03 19:52:22 +01:00
2014-05-03 23:27:38 +01:00
2014-10-16 00:14:01 +03:00
2014-09-11 22:24:45 +01:00
2014-09-17 22:56:34 +01:00
2014-08-30 00:35:11 +01:00
2014-10-22 19:42:55 +01:00
2014-08-30 00:35:11 +01:00
2014-09-13 18:43:09 +01:00
2014-10-25 20:23:13 +01:00
2014-10-25 20:23:13 +01:00
2014-10-25 20:23:13 +01:00
2014-05-03 23:27:38 +01:00
2014-05-03 23:27:38 +01:00
2014-09-10 22:10:33 +01:00
2014-10-03 17:44:14 +00:00
2014-10-06 13:45:34 +00:00
2014-10-03 17:44:14 +00:00
2014-10-03 17:44:14 +00:00
2014-07-03 13:25:24 +01:00
2014-08-30 00:35:11 +01:00
2014-09-08 10:45:23 +01:00
2014-05-03 23:27:38 +01:00
2014-10-03 17:44:14 +00:00
2014-09-17 22:56:34 +01:00
2014-08-30 00:35:11 +01:00
2014-08-30 00:35:11 +01:00
2014-10-03 17:44:14 +00:00
2014-08-30 00:35:11 +01:00
2014-08-30 13:23:35 +01:00
2014-06-01 13:32:54 +01:00
2014-10-23 12:06:53 +01:00
2014-10-03 19:52:22 +01:00
2014-08-30 00:35:11 +01:00
2014-09-25 17:35:56 +01:00
2014-09-17 22:56:34 +01:00
2014-08-30 00:35:11 +01:00
2014-10-23 12:06:53 +01:00
2014-05-03 23:27:38 +01:00
2014-08-30 15:17:47 +01:00
2014-05-03 23:27:38 +01:00
2014-10-23 14:13:05 +01:00
2014-10-03 17:44:14 +00:00
2014-07-03 13:47:47 +01:00
2014-05-03 23:27:38 +01:00
2014-07-03 14:13:33 +01:00
2014-07-03 14:13:33 +01:00
2014-07-03 14:13:33 +01:00
2014-07-03 14:13:33 +01:00
2014-07-19 21:27:22 +03:00
2014-10-03 17:44:14 +00:00
2014-10-03 17:44:14 +00:00
2014-06-07 09:16:42 +02:00
2014-10-22 23:20:15 +01:00
2014-10-24 23:12:25 +01:00
2014-10-03 19:52:22 +01:00
2014-10-23 13:34:35 +01:00
2014-10-03 17:44:14 +00:00
2014-05-21 20:32:59 +01:00
2014-09-23 14:15:45 +00:00
2014-10-23 12:06:53 +01:00
2014-08-30 14:59:21 +01:00
2014-09-08 23:05:16 +01:00
2014-09-08 23:05:16 +01:00
2014-10-03 17:44:14 +00:00
2014-10-25 20:23:13 +01:00
2014-10-22 23:05:50 +01:00
2014-07-03 13:25:24 +01:00
2014-08-30 14:59:21 +01:00
2014-08-30 14:59:21 +01:00
2014-10-24 11:26:12 +00:00
2014-10-18 22:44:07 +03:00
2014-07-03 13:25:24 +01:00
2014-07-03 13:25:24 +01:00
2014-10-25 20:23:13 +01:00
2014-10-25 20:23:13 +01:00
2014-10-03 17:44:14 +00:00