---
title: "三个For优化方案"
author: "抛出异常的爱"
date: "2010-09-14T11:04:00Z"
tags: []
categories: ["编程语言"]
slug: "for"
draft: false
lastmod: "2010-09-14T11:06:18Z"
id: 762792
url: "https://loveexception.iteye.com/blog/762792"
---

http://www.iteye.com/topic/762637
http://www.iteye.com/topic/762312
http://www.iteye.com/topic/632481
这三个贴子说的同一件事.....



```java

package com.maodaju.tools.effection;

public class TestFFF {
	public static void main(String[] args) {
		long start = System.currentTimeMillis();
		for (int i = 0; i < 10000; i++) {
			for (int j = 0; j < 1000; j++) {
				for (int k = 0; k < 100; k++) {
					int t = i*j*k;
				}
			}
		}
		
		
		
		long end = System.currentTimeMillis();
		System.out.println(end-start);
	}
}

```

java -server TestFFF
用时16
java TestFFF
用时1537
效率100比1吧