In mathematics there is a wide class of knot invariants that may be expressed in the form of multiple line integrals computed along the trajectory C describing the spatial conformation of the knot. In this work it is addressed the problem of evaluating invariants of this kind in the case in which the knot is discrete, i.e. its trajectory is constructed by joining together a set of segments of constant length. Such discrete knots appear almost everywhere in numerical simulations of systems containing one dimensional ring-shaped objects. Examples are polymers, the vortex lines in fluids and superfluids like helium and other quantum liquids. Formally, the trajectory of a discrete knot is a piecewise smooth curve characterized by sharp corners at the joints between contiguous segments. The presence of these corners spoils the topological invariance of the knot invariants considered here and prevents the correct evaluation of their values. To solve this problem, a smoothing procedure is presented, which eliminates the sharp corners and transforms the original path C into a curve that is everywhere differentiable. The procedure is quite general and can be applied to any discrete knot defined off or on lattice. This smoothing algorithm is applied to the computation of the Vassiliev knot invariant of degree 2 denoted here with the symbol r(C). This is the simplest knot invariant that admits a definition in terms of multiple line integrals. For a fast derivation of r(C), it is used a Monte Carlo integration technique. It is shown that, after the smoothing, the values of r(C) may be evaluated with an arbitrary precision. Several algorithms for the fast computation of the Vassiliev knot invariant of degree 2 are provided.