bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-apl] Performance improvement result


From: Elias Mårtenson
Subject: [Bug-apl] Performance improvement result
Date: Wed, 30 Apr 2014 16:10:07 +0800

The following patch improves the performace of reading a 10k line file using io∆readfile from several minutes down to about half a second.

The key to this was to avoid cloning the result when reading the value from a variable. This caused functions with lots of variable dereferencing to become incredibly slow. This should be safe as the values are cloned before modification anyway.

The same patch also marks the result of ⎕UCS as temp before returning the value since it's not changed further after returning the value.

Finally, Value::clone() is changed such that it doesn't actually perform any copying if the value is temp, and instead only marks the value non-temp. This is the right thing to do since any caller of clone() presumably wants to have exclusive ownership of the value.

Regards,
Elias

Attachment: varref_perf.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]