title: StringTokenizer - reading lines with integers
body: <p>I have a question about optimization of my code (which works but is too slow...). I am reading an input in a form</p>
  
  <pre><code>X1 Y1
  X2 Y2
  etc
  </code></pre>
  
  <p>where Xi, Yi are integers. I am using <code>bufferedReader</code> for reading lines and then <code>StringTokenizer</code> for processing those numbers like this:</p>
  
  <pre><code>StringTokenizer st = new StringTokenizer(line, " ");
  
  int x = Integer.parseInt(st.nextToken());
  int y = Integer.parseInt(st.nextToken());
  </code></pre>
  
  <p>The problem is that this approach seems time inefficient when coping with large data sets. Could you suggest me some simple improvement (I have heard that some integer parse int or regex can be used) which would improve the performance? Thanks for any tips</p>
  
  <p>EDIT: Perhaps I misjudged myself and some improvements have to be done elsewhere in the code...</p>