diff options
| author | Shulhan <ms@kilabit.info> | 2023-09-11 00:47:34 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-09-11 02:26:33 +0700 |
| commit | bd9e01a5164be7710223204aa8edabd8eb5ffca7 (patch) | |
| tree | 9e841000b125132c61ec49ea31b670ae0e8c4702 /lib/xmlrpc/value.go | |
| parent | bbd586f64729f6db9035744ad89aadef27b0edf8 (diff) | |
| download | pakakeh.go-bd9e01a5164be7710223204aa8edabd8eb5ffca7.tar.xz | |
lib/xmlrpc: realign struct for better size allocation
The realignment reduce the cost of the following struct,
* Client: from 24 to 16 bytes (-8)
* Response: from 64 to 48 bytes (-16)
* Value: from 40 to 32 bytes (-8)
Diffstat (limited to 'lib/xmlrpc/value.go')
| -rw-r--r-- | lib/xmlrpc/value.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/xmlrpc/value.go b/lib/xmlrpc/value.go index 8b25245d..b98d48bc 100644 --- a/lib/xmlrpc/value.go +++ b/lib/xmlrpc/value.go @@ -13,7 +13,6 @@ import ( // Value represent dynamic value of XML-RPC type. type Value struct { - Kind Kind // In contains scalar value for Base64, Boolean, Double, Integer, // String, and DateTime. // It would be nil for Kind of Array and Struct. @@ -24,6 +23,8 @@ type Value struct { // List of array values. ArrayValues []*Value + + Kind Kind } // NewValue convert Go type data into XML-RPC value. |
