|Re: [eigen] EigenLab: C++ run-time matrix math ala MATLAB.|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] EigenLab: C++ run-time matrix math ala MATLAB.
- From: Marcel Goldschen <marcel.goldschen@xxxxxxxxx>
- Date: Thu, 25 Sep 2014 09:19:02 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=XNY9U43jkDhkZpzabDDJ5YHA4iXcfqXFRnNNee3pYH4=; b=zOjZtAUpRuEr9Onb3hE5oiFrOF/qMX3SAtuBHxS76wUzAajlBFaqddFapUCF8g8+JG kdGy3bLtnK0Y2RCeVmYs9XCChFy/bsBrM2xEJWHi7azNyTkku/VfMailuwJUkYxcdz69 RKGstlLOmWYthHp42Hyy0NfSqY9q5JehsEu8xxWf/v3dB5zQv+YqHoHu3Ggz3YtZWt2u pzCZIxzpTEi0B6VyDs77JJNdQXFbjQiuSggbgOMYM/VD9lfJLqREXDhCC/vYyeypjd9t GqLEPmIjEse9RR6Ojw4wORDUYObzn45H7WNTkzDV6gyxGJycHcucmY3Nllir0ekzNiGu gWrQ==
Thanks for the comments Ilja. As you have shown, my goal with EigenLab was not brute efficiency at simple numeric expressions, but to provide a parser that can handle matrix operations and also provide an simple intuitive interface. If your equations do not require matrices, then something like muParser may be better for you. That said, if you are interested in increasing EigenLab's efficiency in this regard, that would be great. Regarding parsing an equation once and reusing it with new values, EigenLab currently does not do this. However, it would not be hard to store the parsed chunks and then rerun an evaluation on them with new variable values. For my uses, the matrix operations take way longer than parsing the equation, so I never bothered to do anything like this, but it's fairly easily implemented if needed. I'll add it to the list of things for the next version. This might also go a long way to closing the performance gap you've shown in your examples assuming EigenLab is parsing the equation 1e6 times whereas muParser is parsing it only once. I'll also see about putting a custom error message in for bad indices rather than using Eigen's error messages.