cube('PPX0a.zip','Producer Price',cgroup,cname,y,indicator, '','','-','','','','',cty) = sum((j2c(j,c),cgmap(cgroup,c),cnamemap(c,cname)), PPX0(j,cty,y)); |
loop((cgmap(cgroup,c),cnamemap(c,cname)), cube('PPX0b.zip','Producer Price',cgroup,cname,y,indicator, '','','-','','','','',cty) = sum(j2c(j,c), PPX0(j,cty,y)); ); |
---- 289 Assignment cube 344.247 344.247 SECS 100 Mb 634708 ---- 294 Loop 2.590 346.837 SECS 107 Mb |
In a sense modeling languages are still woefully inadequate and much too primitive. From the first fragment a system like GAMS should be able to understand the meaning of what I want to do and should be able to re-arrange computations to achieve near-optimal performance.
This is a similar to RDBMS systems where query optimizers try to find the most efficient way to execute an SQL query. Although that is more mature technology (not in the least because of larger budgets for larger development teams), even here we see that an experienced database user is able to write much more efficient SQL queries than the average user.
No comments:
Post a Comment