Code-Golf: Lattice Points inside a Circle
J, 21 19 18

+/@,@(&gt;:|@j./~@i:)


Builds complexes from -x-xj to x+xj and takes magnitude. 

Edit: With &gt;:

Edit 2: With hook and monadic ~. Runs a few times slower for some reason, but still 10-ish seconds for f(1000).