Topic on Talk:XTools

Absolute sizes in edit counter

2
PJvanMill (talkcontribs)

Hello, there.

I think that in the "Edit counter" tool:

  1. After "Average edit size" should come "Average edit size (abs.)" with the average of the absolute-value (n --> n; -n --> n) edit sizes
  2. "Small edits" and "Large edits" should look at the absolute-value edit sizes - currently an edit removing >1000 bytes is seemingly counted as a "Small edit" instead of a "Large edit", making those metrics worse than useless in some cases

I know that #1 has already been suggested a year ago and seems to have been rejected on the basis that it's too computationally expensive. I think calculating calculating absolute values should be very light on resources, though, at least when not done with squaring and taking the square root (as the submitter of the previous topic suggested) but instead with something like an if-statement that does (n --> n; -n --> n).

Kind regards from someone with a negative average edit size

PJvanMill (talkcontribs)

Oh, I see I used some very weird notation there. What I mean is something like:

if size < 0 {
abssize = -size
} else {
abssize = size
}

This would have to be done on every edit being analysed, so it might still be computationally expensive...?

Reply to "Absolute sizes in edit counter"