3 ms·
The main deal is that an instance method (e.g. append) uses the latest stack value as the instance and has its return value put on the stack. So when chaining,
by kodablah 10y ago
The main deal is that an instance method (e.g. append) uses the latest stack value as the instance and has its return value put on the stack. So when chaining, it doesn't need to re-put the variable on the stack to call the next method. When not chaining, it has to pop (i.e. discard) that previous return value and then re-put the builder/buffer variable on the stack each time.
But this is seriously micro-opimtization only beneficial in the most strict of situations. Only in this crazy situations would I ever use this as justification to choose one approach over the other.