|
|
|
|
|
by jameshart
3743 days ago
|
|
Best practice for performance for large left-pad jobs is to call the service recursively using mapreduce. Remember that left-pad(str,pad,n) is equal to left-pad(left-pad(str,pad,n/2),left-pad("",pad,n/2),n). This should run in logarithmic time and is highly parallelizable. If you don't like the "" magic string in there you could replace it with a call to left-pad(null, null,0). |
|